SQL_Count_Fuction

SQL Count function you really need Group By

SQL count(*) in query is little tricky. This post explains why you need to use group by along with count aggregate function