=QUERY(Activity_2019, "SELECT A,F, YEAR(H), MONTH(H), DAY(H), sum(O) where A='Trades' group by G,A,F, YEAR(H), MONTH(H), DAY(H)",1)
I'm trying to sum rows which are grouped by identical cell values. This is working fine until I add also try to print the Day, Month and Year which I'm trying to grab from a string located in column H.
Here are 3 sample rows that produce a correct sum(O) result. Unfortunately, Column H contains a string which holds both date and time. The grouped rows have identical year, month and day and not time as you can see below. Can anyone help me grab the year, month and day only for the summed group? Is this possible with Google Sheets query?
Column H
2019-01-03, 09:30:32
2019-01-03, 09:31:17
2019-01-03, 09:35:01
Here is a sample google sheet to see what I mean. https://docs.google.com/spreadsheets/d/1-C9bMX687ViakkTf5hXBldeFeu7xRtShTx6RfiYGiS4/edit#gid=0