I am using the query function to generate content in Sheet 1 pulled from sheets 2-6. I've used this function in past, and its worked quite well – but only when I am pulling from 5 sheets. No more, no less. I do not understand this function as it was taken from an old template. I am interested in creating a new function to serve my purpose and learn how to decipher the meaning of the clauses. Please help.
This is the old function:
=query(query({Sheet2!A1:L;Sheet3!A1:L;Sheet4!A1:L;'Sheet5'!A1:L;Sheet6!A1:L},"select Col1, count(Col1), max(Col4) where Col1 <> 'Testing' group by Col1 order by max(Col4) desc",0), "select * where Col2 > 1",0)
What does each clause mean?
How can I alter it for greater/lesser number of sheets?