I have the following query to combine three tabs in a Google spreadsheet:
=QUERY({'Stock 1'!A:N;'Stock 2'!A2:N;'Stock 3'!A2:N};"Select Col1, Col2, Col3, Col4 Where Col3<>''";1)
In the grouped tab (Total Stock) I want to change all cells of column D (Col4) to "Company 1"
Is there any function similar to "set" in SQL?
Example:
try:
=QUERY({'Stock 1'!A:D; 'Stock 2'!A2:D; 'Stock 3'!A2:D}; "where Col1 is not null"; 1)
or:
=QUERY({'Stock 1'!A:D; 'Stock 2'!A2:D; 'Stock 3'!A2:D};
"select Col1,Col2,Col3,'Company X' where Col1 is not null label 'Company X''Company'"; 1)