I have two tables A & B.
Table A
GROUP # | GROUP NAME
1 group a
2 group b
3 group c
Table B will have a column with group # and then a bunch of other data.
I'm trying to figure out how I can create a query that will return the GROUP NAME
from TABLE A and the number of rows associated with each group name from TABLE B.
Essentially I'm trying to get the following output:
GROUP NAME | COUNT
group a x
group b y
group c z
I've been trying variations of the following to no avail...
SELECT DISTINCT "GROUP NAME", COUNT(*) from A, B where A.GROUPNUM = B.GROUPNUM;