Search code examples
google-sheetsformulasgoogle-query-language

Google SpreadSheet Query: How to find specific data


https://gyazo.com/07bafa5de65bfbfc8d523d1e5eaa0fbf

data I have some data A1:G5 and i want to find latest fee from specific transactions (in WHERE -> FROM, Currency )

I have timestamp:

=QUERY(A1:G5, "SELECT MAX(A)  WHERE F = 'Aaaa' AND C = 'PLN' ")

1) I dont want label.
2) How to get fee?

Answer:

Last Fee: 0.1

Timestamp: 13/02/2018 13:01:21


Solution

  • Please try (it avoids MAX):

    =query(A1:G5,"select E, A where F = 'Aaaa' and C = 'PLN' order by A desc limit 1",0)