How create a calculated column without including original column in the 'GROUP BY'?

I have a table with orders, from which I wanna use the ‘DATE’ column and the ‘PRICE’ column. The thing is ‘DATE’ is a date-time value and I’m interested in using only the hour of the day from that timestamp, so I can sum all order prices within an hour, an plot that.

So I created a new column extracting the hour, but then I can’t sum the prices because the original ‘DATE’ column is still in the ‘group by’, so I’d like to get rid of it. Is this possible?

0 3 316
3 REPLIES 3
Top Labels in this Space