Google-sheets – How do i use the query in google sheets to return N results from each tab

google sheetsgoogle-sheets-query

How do I use the query in Google Sheets to return N results from each tab.

So I have this formula:

=QUERY({sheet1!A2:D;sheet2!A2:D}; "select * where Col4>=65 order by Col4 desc Limit 3")

But what I want is that the results to be limited to 3 but from each individual sheet tab so I have displayed 3 results from sheet1 and 3 from sheet2.

Best Answer

Use the following

={QUERY({sheet1!A2:D}; "select * where Col4>=65 order by Col4 desc Limit 3"),
  QUERY({sheet2!A2:D}; "select * where Col4>=65 order by Col4 desc Limit 3")}

(do adjust syntax according to your locale)