HI guys
is it possible to count items using self join
example
CLASSA=2 (total number of class that is 3)
CLASSB=4 (total number of class that is 4)
CLASSC=1 (total number of class that is 2)
and this is my table
id | class | region
1 3 7
2 4 7
3 4 9
4 3 8
5 2 3
6 4 8
7 4 3
and so far im stuck with this query
select COUNT(C1.class) as CLASSA, COUNT(C2.class) as CLASSB
FROM MYTABLE C1, MYTABLE.C2
left join??? ?// not sure here
where c1.class=2 // not sure here