Google Sheets – Using Column Range for Comparison in Query

google sheetsgoogle-sheets-queryimportrange

Suppose I have a table with 3 columns in a Google Spreadsheets sheet. Col1 is a name and Col2 and Col3 are numbers. Can we use a column range for number comparison such as in the example below? (what I've written below obviously doesn't work)

select * where Col1='John' AND Col2 to Col3 > 0

Is there a way to achieve the same result?

Best Answer

Google Query Language hasn't a to operator.

Instead of Col2 to Col3 > 0 try Col2 > 0 AND Col3 > 0

Reference