我有两组结果:
SELECT name, count(appearance) as countA from table where results = '1'
SELECT name, count(appearance) as countB from table where results = '2'
我想将它们并排组合,如下所示:
+---------+---------+---------+
| col_1 | countA | countB |
+---------+---------+---------+
| John | 3 | 1 |
| Mary | 1 | 2 |
| Gary | 2 | NULL |
| Sean | 4 | NULL |
| Mike | NULL | 6 |
+---------+---------+---------+
我怎么做?