I’m trying to write a query that sums transaction amounts in my transactions table by day (or week, or month) in order to drive a line chart on our front-end.
The relevant table and fields are:
table: transactions
fields: timestamp (datetime)
txn_amount (float)
We’re trying to return two columns in the result. One is the date: “1/1/10” and the other is the sum for that day. I’ve never grouped by time periods before. Thanks!