Search code examples
google-sheetsgoogle-sheets-formulagoogle-query-language

To use AND and OR both together in google sheet query


Is there any way I can use both operator i.e. AND and OR in the Google Sheets Query. For e.g.

"Select * where Col1 contains 'Yes' or Col2 contains 'Yes' and Col3 contains 'Please'"

Solution

  • Try

    "Select * where (Col1 contains 'Yes' or Col2 contains 'Yes') and Col3 contains 'Please'"
    

    add parenthesis