MySQL SUM Query daily values of a week problem
Posted
by davykiash
on Stack Overflow
See other posts from Stack Overflow
or by davykiash
Published on 2010-03-31T16:38:03Z
Indexed on
2010/03/31
16:43 UTC
Read the original article
Hit count: 262
Am trying to return the sum of each day of a week in mysql but it returns nothing despite having values for the 3rd Week of March 2010
SELECT SUM(expense_details_amount) AS total
FROM expense_details
WHERE YEAR(expense_details_date) = '2010'
AND MONTH(expense_details_date) = '03'
AND WEEK(expense_details_date) = '3'
GROUP BY DAY(expense_details_date)
How do I go about this?
© Stack Overflow or respective owner