3

I have column A as ID , column B as Score and column C as Date in Google Sheet and I wanted to select the data and ORDER by column C DESC.

The result come out as below:

A   B   C
123 100 30/07/19
111 100 30/07/19
113 100 29/07/19
112 100 28/07/19
115 100 02/08/19
016 100 01/08/19

The result should be:

115 100 02/08/19
016 100 01/08/19
123 100 30/07/19
111 100 30/07/19
113 100 29/07/19
112 100 28/07/19

How can I solve this with SQL in Google Sheet?

Select A,B,C Where B LIKE '% 100 &%' Order By C DESC
player0
  • 124,011
  • 12
  • 67
  • 124

1 Answers1

4

it's a formatting issue... format column A as Plain Text, column B as Number and column C as Date. then use this formula:

=QUERY(A2:C, "select A,B,C where B = 100 order by C desc", 0)

0

player0
  • 124,011
  • 12
  • 67
  • 124
  • 1
    Adding the final Zero argument into the query to disable headers solved this for me! =QUERY(range, query, header_rows). Even with correct formatting, ordering was being weird because it thought the first row was a header. – J Manifold Jan 12 '23 at 18:49