count and sum how to
535603Sep 24 2006 — edited Oct 23 2006i need to count all the rows where field1=something and field2=something and field3=something. it has to satisfy all 3 conditions before it counts.
likewise, i need a sum of the all the rows counted above.
how do i do this?
this is my sql query so far and i need to add the count and sum functionality
SELECT
field1,
field2,
field3,
field4,
field5,
FROM
table1
WHERE
field6='something' and
field2 between 30 and 32
ORDER BY
field1,field2 ASC