Hi there,
I got a MySQL table like this:
code date value
1 20000102 20.00
2 20000109 12.00
3 20000114 23.00
4 20000201 11.00
5 20000202 10.00
6 20000224 12.00
7 20000311 25.00
8 20000318 30.00
9 20000323 13.00
10 20000329 19.00
SELECT SUM(value)
FROM table
GROUP BY XXXXXX
I'd like to run a query that returns how many rows as the number of months
in "date". In each row, the sum for the period.
I'd have to use something like a substring function, but "group by" doesn't
accept that. Does anyone know how to solve this specific query ? Is this
possible ?
Thanks,
- lacj
PHP/Perl/MySQL Development