2

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)")
player0
  • 124,011
  • 12
  • 67
  • 124
user1452962
  • 386
  • 3
  • 8

1 Answers1

5

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

player0
  • 124,011
  • 12
  • 67
  • 124