hello there i need help.
sample i have fields on my database such us item & date purchase
items like paper, pen & etc.
date is 2005-08-01 12:56:05
basically i have tons of records and i want to make a query where i can group the all the records per item and per date.
so sample i want my item group first so that it only represent once and group the date
i use this query
SELECT substring(date, 1,10) AS dd, COUNT(*) FROM report.tbl_data_out where month(date)=8 and year(date)=2005 GROUP BY dd order by dd;
but this only group my date and if im going to make it like this
SELECT substring(date, 1,10) AS dd, COUNT(*) FROM report.tbl_datat_out where month(date)=8 and year(date)=2005 GROUP BY item, dd order by dd;
it gives me a lot of dates like this
2005-08-01 15
2005-08-01 25
2005-08-01 5
how can i group it again to be displayed like this
2005-08-01 45
please help me.
and for those willing to help i would say thank you in advance.