Google-sheets – How to include parameters in Google Sheet

google sheetsgoogle-sheets-arrayformulagoogle-sheets-query

I have a query string to extract data from my master sheet, which looks like this:

=QUERY(IMPORTRANGE("1ABCsxIDRXU-k6YXWJ47Awjk4757VsMFBmye7rkBC123","Master!$A$1:$H"),"SELECT * **WHERE Col2 = 'abc123'** ORDER by Col1",1)

However, the problem is it only extracts data for "abc123" in column 2 of my Master Sheet

I also would like to include data that has parameters behind? For example: abc123&fbclid=xxxxxxxxxxxxxxxxxxxxxxx

How can I include both with and without parameters data?

Best Answer

Try:

=query({K14:M17},"SELECT * WHERE Col2 contains 'abc123'",1)

contains is a substring match. Refer the documentation on Query, specifically "WHERE" for more details and alternatives