table B, table c.
Table A has ID, col1
ID COL1
1 abc
2 bcd
Table B has col2, col3
col2 col3
bcc abc
acc bcd
Table C has ID,col4
ID col3
1 qwe
1 tre
1 uid
2 jkj
2 jwekj
Now, i need to select ID, COL1,COL2, count(ID in table C). The sample output will be
ID COL1 COL2 CNT
1 abc bcc 3
2 bcd acc 2
Could anyone please help me in this? Table A and B are joined using COl1 and COL3.