I don't know if I've written everything correctly. I need to
count the occurrance of ID for each Name and then show the sum of
the values in Num1 and Num2 for each name.
/t5/dreamweaver-discussions/query/m-p/718414#M173118Nov 23, 2006
Nov 23, 2006
Copy link to clipboard
Copied
.oO(Anhialator)
> I don't know if I've written everything correctly. I
need to count the
>occurrance of ID for each Name and then show the sum of
the values in Num1 and
>Num2 for each name.
Try
SELECT
COUNT(*) AS count,
name,
SUM(num1) AS num1,
SUM(num2) AS num2
FROM shirt
GROUP BY name