Reputation: 386
Given the following data:
123 2020-06-22 23:00:00 124 2020-06-22 23:30:00 121 2020-06-23 00:00:00
I want the hour/minute of the minimum price in a Google Sheet. I tried using without success:
=QUERY(A:B,"select hour(B), min(A) group by todate(B)")
=QUERY(A:B,"select B, min(A) group by todate(B)")
Upvotes: 2
Views: 154
Reputation: 1
try like this:
=INDEX(SORT(A:B); 1)
or for each date:
=ARRAY_CONSTRAIN(SORTN(SORT({A:B, DATEVALUE(B:B)}), 9^9, 2, 3, 1), 9^9, 2)
Upvotes: 5