I hava a short question: I need to take a first value for each day in the table like below:
Date Price
2018-09-01 10:00:00 123
2018-09-01 10:01:00 2568
2018-09-01 10:02:00 2155
2018-09-01 10:03:00 23
2018-09-02 10:03:00 25868
2018-09-02 10:10:00 84213
2018-09-03 15:10:00 58192
2018-09-03 10:16:00 36
So result should be like this:
Date Price
2018-09-01 10:00:00 123
2018-09-02 10:03:00 25868
2018-09-03 10:16:00 58192
My query looks like this:
SELECT price, min(date)
FROM table
WHERE data BETWEEN '2018-09-01%' AND "2018-09-03%"
GROUP BY date
And I have an issue here. I can't write a query that will take into account first minutes for each day. Could any one help me to solve this issue ?
Thanks for any answers