QUERY function Runs a Google Visualization API Query Language query across data. Sample Usage QUERY(A2:E6,"select avg(A) pivot B") QUERY(A2:E6,F2,FALSE) Syntax QUERY(data, query, [headers]) data - The range of cells to perform the query on. Each column of data can only hold boolean, numeric (including date/time types) or string values.