this counts all items in B and groups on A:
SELECT A, Count(*) AS [Count All]
FROM MyTable
GROUP BY A;
this counts all 1s in B and groups on A:
SELECT A, Count(*) AS [Count Ones]
FROM MyTable
WHERE
MyTable.[B]='1'
GROUP BY A;
How do I put both columns (all and 1s) and additionally, how could I show percentage in another row
table columns:
[A] [COUNT ALL] [COUNT ONES] [ONES/ALL]