user1452962
user1452962

Reputation: 386

Google sheets find MIN time of min price

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

Answers (1)

player0
player0

Reputation: 1

try like this:

=INDEX(SORT(A:B); 1)

0


or for each date:

=ARRAY_CONSTRAIN(SORTN(SORT({A:B, DATEVALUE(B:B)}), 9^9, 2, 3, 1), 9^9, 2)

enter image description here

Upvotes: 5

Related Questions