因此,我有几个 Google 表格选项卡包含相似的数据并希望合并到主表格中,但每个查询都有两个不同的条件。我试过了:
={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'")