I have a Google Form. Upon submit following fields are populated:
- Timestamp
- Product Description
- Unit Price
- Quanitity
I have generated a pivot table from this data, in a Google Spreadsheet. The first column is a timestamp and the second column is the sum
of Unit Price. All is grouped by the timestamp
.
I don't want it. I want to show the year-month at column 1 and the total costs on that month. It should be group by that month.
In SQL
I would run this query:
SELECT
DATE_FORMAT(`Timestamp`, '%Y-%b'),
SUM(`Unit Price`*`Quantity`)
FROM
TABLE1
GROUP BY DATE_FORMAT(`Timestamp`, '%Y-%b')