I have these two tables:
type
TYPE_ID TYPE
1 Type1
2 Type2
3 Type3
4 Type4
user_type
USRTYPE_ID TYPE_ID
1 1
2 1
3 2
4 4
What I need to do is count how many types are there in user_type table. For e.g.
SELECT QUERY returns:
TYPE QUANTITY
Type1 2
Type2 1
Type4 4