The syntax for QUERY is QUERY(data, query, [headers])
In your case, you forgot the ,
between the data
and the query
.
It should be ...query({'Sheet1'!$A$2:$T;'Sheet2'!$A$2:$BK}, "select {'Sheet2'!$A$2:$BK}.B where...
CLICK HERE to find out more related problems solutions.