Questions tagged [google-query-language]

Google Query Language is the part of the Google Visualization API that lets the developer perform various data manipulations with the query to the data source. This could also be used in the Google Sheets QUERY built-in function.

Google Query Language allow developers to perform various data manipulations using a syntax very similar to the SQL syntax. It's part of the and can be used in through the QUERY built-in function.

Before posting a question about the Google Query Language check the reference documentation.

1114 questions
2
votes
1 answer

How to make a Google query pull only TRUE values from two different columns

I am having trouble creating a query to pull only TRUE values from two specified columns. On the Data tab I only want data to populate in the query if either columns 10 or 11 contain TRUE values. For some reason the query is pulling data that…
2
votes
1 answer

Perform a lookup to find out values from another column and summarises them using Google Sheets

Example data below. I want to be able to sum the values in Col2 for each occurrence of Col 1, depending on the values in 'Other Cols' that are applied in combination with the value in Col1 Col1------Col2-----Other Cols A---------40-------other…
2
votes
1 answer

Google Sheets select, count, limit

In a Google Sheets document, I've got a column which contains multiple values. I want to get the first 20 values by count, and then group the count of the others. I've got this working code for now: =QUERY(B2:B165,"select B, count(B) group by B…
2
votes
1 answer

Is there a formula to sort data containing certain text and date?

Google Sheets. I need to pull the data from the Raw Data sheet into the date and cost columns (in red). I need the data to match the named platform (in blue) and show the date and corresponding cost in ascending order. I've managed to complete one…
2
votes
3 answers

Is there a way to group timestamp data by 30 day intervals starting from the min(date) and add them as columns

I am trying to use the min() value of a timestamp as a starting point and then group data by 30 day intervals in order to get a count of occurrences for each unique value within the timestamp date range as columns i have two tables that i am…
CCP
  • 129
  • 2
  • 15
2
votes
1 answer

In Google Query, return 0 to cell when query returns empty set for a particular month

Using Google Query, I would like to return 0 to a cell when the query returns an empty set for a particular month in 2018. This is the query I am using with the named range all_data: =query(all_data,"SELECT SUM(A) WHERE F <> 'Converted' GROUP BY…
Adam
  • 308
  • 1
  • 4
  • 17
2
votes
0 answers

How to use Google sheets query or Google visualization api from apps script?

I am using a Google Script bound to a Google Sheet to programatically generate the following query: =query('16 Jul - 20 Jul Responses'!A1:I31, "SELECT C WHERE D = 'Available'", 0) Is there any way in Google Scripts to parse an object representation…
2
votes
2 answers

Google docs query when contains value in a range

In google sheets, I want to return a row when a cell in column C contains any value in a range on a different sheet. The query below does not work. What am I missing? =QUERY( 'Form Responses 1'!$1:$1000, " select A:G where C contains…
mordecai98
  • 21
  • 1
  • 4
2
votes
3 answers

Query order by ASC in google spreadsheets

I have a google spreadsheet that uses the following query: =query('Respostas do Formulário 1'!A1:AG;"select D,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF WHERE B='7ºA' order by D ASC";1) However column D from sheet: "Respostas do…
Mary
  • 301
  • 1
  • 2
  • 10
2
votes
2 answers

Google Sheet Query Error: Unable to parse query string for Function QUERY parameter 2: AVG_SUM_ONLY_NUMERIC

I am getting this error message on my query formula "Unable to parse query string for Function QUERY parameter 2: AVG_SUM_ONLY_NUMERIC" and I don't know what seems to be the problem. I already change the format of column C to percentage but I'm…
Zyre Soriano
  • 575
  • 4
  • 13
  • 25
2
votes
1 answer

QUERY in combination with IMPORTRANGE sorts accented values incorrectly

As stated in the title, suppose I have spreadsheet with following values: B C A Š Ť Á I then import the values from this spreadsheet using QUERY and IMPORTRANGE to different spreadsheet, exact function: =QUERY(IMPORTRANGE(""; "List…
quapka
  • 2,799
  • 4
  • 21
  • 35
2
votes
2 answers

Google Query Language GQL string manipulation I need a REPLACE or SUBSTITUTE function

I'm using Google Sheets with an imported CSV. The range I perform queries on is called 'Import' I need to do simple string functions, like REPLACE() and LEN() to evaluate if the data I have is acceptable. I've been searching, and cannot find any…
2
votes
1 answer

Google Sheets Query language: can you use other SQL instructions like UPDATE, INSERT…?

I have a Google Sheet where I can select rows using its query language with its SQL-like queries: "SELECT A WHERE B > whatever", etc. I have now, however, a different column with a list of IDs, and I want to update all the rows that appear in that…
PaulJ
  • 1,646
  • 5
  • 33
  • 52
2
votes
1 answer

Query in Google Spreadsheet

I made a simple query function as this: =QUERY(range,"select *",1), in my Google Spreadsheet, but the results dose not show any letters, it shows only fields that contains numbers.
2
votes
1 answer

How to compare a DATE with a TEXT string in a QUERY function in Google Sheets?

Goal: Return a specific value from a table of data based on a query (kinda like if VLOOKUP provided the option for multiple criteria). Problem: The data in the source table is a value and I can't change the data source's format. When I run my QUERY…
Kevin Taylor
  • 31
  • 1
  • 3