Click here to Skip to main content
15,887,477 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
count prodid catid

107 32553 55
101 48688 568
95 54839 5412
72 40818 8991
50 36828 928
49 26825 928



here count is count of prodid
but i want count according to catid
Posted
Comments
Vikas_Shukla_89 7-Oct-11 5:26am    
pls be more clear..
and paste ur code if u can, so it will easy for me to understand
OriginalGriff 7-Oct-11 5:43am    
Without seeing how you are fetching or generating the count field, it is difficult to the point of impossibility for use to help.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

May you have to try a query like this :
For each CATID and PRODID it display the sum of "Count"

SQL
SELECT CATID, SUM([count]) AS NB_PRODID
FROM *type_here_your_table_name*
GROUP BY CATID, PRODID, [COUNT]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900