Hi guys,
I have created one temporary table in which corresponding to one fileid which is primary key, I am having 5 rows. I want to get the count as 5. What query do I have to write to get the count corresponding to each fileid?
Hi guys,
I have created one temporary table in which corresponding to one fileid which is primary key, I am having 5 rows. I want to get the count as 5. What query do I have to write to get the count corresponding to each fileid?
Select Count(Primary_Key_Field) as PrimaryFieldCount, Primary_Key
From TmpTbl
Group by Primary_Key
SELECT
     GroupByField,
     COUNT(*)
FROM 
     #TableName
GROUP BY
    GroupByField