Guest_imported
New member
- Jan 1, 1970
- 0
I would like to max the sum of a field:
I have:
"SELECT SUM(qnty),prod FROM tpurcd
GROUP BY prod"
-->this return the sums
but what i want is the max of these sums
like this:
"SELECT MAX(SUM(qnty)),prod,TO_CHAR(recv,'MM') FROM tpurcd
GROUP BY prod"
but error "not a single-group group function"
any ideas???
gawell
I have:
"SELECT SUM(qnty),prod FROM tpurcd
GROUP BY prod"
-->this return the sums
but what i want is the max of these sums
like this:
"SELECT MAX(SUM(qnty)),prod,TO_CHAR(recv,'MM') FROM tpurcd
GROUP BY prod"
but error "not a single-group group function"
any ideas???
gawell