Filtering on google sheets using Query returns just one row

怎甘沉沦 提交于 2021-01-28 04:41:51

问题


Context

I am trying to filter data by date range using Query. I want data from 31/12/2019 onwards. This is the formula I used:

=Query(Query(ImportRange("ID", "RotorkPrice"),"offset 2",1),"select * where Col1 >= '2019-12-31'")

This only returns the top row (though I did ask Query to remove the first 2 rows). The data looks like so:

I took examples from here and here, and have been following this guide.

Problem

Is there a way to only draw data from this date onwards using Query?

The spreadsheet is here.


回答1:


you are missing date. try:

=QUERT(QUERY(IMPORTRANGE("ID", "RotorkPrice"), 
 "offset 1", 0), 
 "where Col1 >= date '2019-12-31'", 0)


来源:https://stackoverflow.com/questions/65785169/filtering-on-google-sheets-using-query-returns-just-one-row

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!