I am making a graph and need to generate an array from the information in a sales table which I have. It’s columns include DATE (2010-09-30 13:48:58) and AMOUNT (4.99). What’s in brackets are examples of the type of data in each column.
What I would like to do in SQL is to go through the table and get totals of the amount for each month so that I can create an array with it.
How do I do this in SQL? Thanks!
A simple aggregate.
This is quite standard SQL too (subject to delimiting names that are reserved keywords)