Google 个工作表的 QUERY 多个工作表和 return 个唯一值

Google Sheets' QUERY multiple sheets and return unique values

我需要查询两个 sheet 和 return 符合特定条件的所有列和唯一值。

我用过这个但是没用:

=UNIQUE(QUERY(Sheet1!A:D,Sheet2!A:D, "select * where B=0"))

我的分享sheet:

https://docs.google.com/spreadsheets/d/1ysuvyBHU21uXv_DxzBJwC7tMnGPyaqFqab7m1d-vwyo/edit?usp=sharing

=UNIQUE(QUERY({Sheet1!A:D; Sheet2!A:D}, "where Col2=0"))


=UNIQUE(QUERY({
 Sheet1!A:D, {"Name"; TRANSPOSE(SPLIT(REPT("♦Comp1", ROWS(Sheet1!A:A)-1), "♦"))}; 
 Sheet2!A:D,          TRANSPOSE(SPLIT(REPT("♦Comp2", ROWS(Sheet2!A:A)),   "♦"))}, 
 "where Col2=0"))