I have a MySQL query like this:
SELECT DAYNAME(CreatedAt) AS TheDay, SUM(Amount) AS TheSum
FROM OrderTransactions
GROUP BY TheDay
# Returns an array like:
# Array
# (
# [0] => Array
# (
# [TheDay] => Thursday
# [TheSum] => 0.02
# )
#
# [1] => Array
# (
# [TheDay] => Wednesday
# [TheSum] => 0.02
# )
#
# )
I also have a clause in there to select only transactions from the last week. If there were no transactions on certain days though, how can I still make it return a $0.00 amount for each empty day?