Hello, I have this query that has data for every minute which I have attached some data of the table.
I want to group this into 4 hours starting from 00:00, but I don't want to sum or average the value in the column [Last] I just want to return that value in the [Last] column as it is at that specific grouped hour.
SELECT b.[timestamp], b.[id], b.[Date], b.[HourMin], b.[Min], b.[Last]
FROM [vw_BassLineDataTimestamp] b
So should return this instead
timestamp id Date HourMin Min Last
2017-11-20T08:00:48.467 BTC-LTC_2017-11-20_08:00 2017-11-20 08:00 0 0.00890995
2017-11-20T04:00:50.583 BTC-LTC_2017-11-20_04:00 2017-11-20 04:00 0 0.009015
2017-11-20T00:00:51.573 BTC-LTC_2017-11-20_00:00 2017-11-20 00:00 0 0.0089
Thanks in advance.
Also if possible could I amend the hour interval so instead of 4 hours (240 min) to any say like 5.71667 hours (343min) or any interval would be great.