是否有 Google 工作表功能允许您对具有相似字段但不同条件的不同数据集进行多次查询?

Is there a Google sheets function that allow you to do multiple queries for different data sets with similar fields, but different conditions?

所以我有几个 Google 工作表选项卡,它们包含相似的数据并想合并到主 sheet 中,但每个查询都有两个不同的条件。我试过:

={query({INVENTORY!$A:$Z},"SELECT Col1, Col2, Col3, Col4, Col5, Col15, Col17, Col18, Col7, Col11, Col12, Col13, Col14 WHERE Col15 IS NOT NULL and Col15 < "&F1&" and Col19 <> 'Printed' AND Col20 = 'Restock' ORDER BY Col15 ASC LIMIT 200",1),query({PREINVENTORY!$A:$O},"SELECT Col1, Col2, Col3, Col4, Col6, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14 WHERE Col15 = 'X'")}

=QUERY(IMPORTRANGE("url", "INVENTORY!$A:$Z"),"SELECT Col1, Col2, Col3, Col4, Col5, Col15, Col17, Col18, Col7, Col11, Col12, Col13, Col14 WHERE Col15 IS NOT NULL and Col15 < "&F1&" and Col19 <> 'Printed' AND Col20 = 'Restock' ORDER BY Col15 ASC LIMIT 200",1)QUERY(IMPORTRANGE("url", "PREINVENTORY!$A3:$P2000"),"SELECT Col1, Col2, Col3, Col4, Col5, Col7, Col8, Col9, Col10, Col11, Col12, Col13, Col14 WHERE Col16 = 'X'")

尝试:

={QUERY(IMPORTRANGE("url", "INVENTORY!$A:$Z"), 
 "SELECT Col1,Col2,Col3,Col4,Col5,Col15,Col17,Col18,Col7,Col11,Col12,Col13,Col14 
  WHERE Col15 IS NOT NULL 
    AND Col15 < "&F1&" 
    AND Col19 <> 'Printed' 
    AND Col20 = 'Restock' 
  ORDER BY Col15 ASC 
  LIMIT 200", 1);
 QUERY(IMPORTRANGE("url", "PREINVENTORY!$A3:$P2000"),
 "SELECT Col1,Col2,Col3,Col4,Col5,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14 
  WHERE Col16 = 'X'")}