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
3
votes
1 answer

How do I get REGEXMATCH to look for multiple terms across a range of cells rather than looking at one cell?

Working in google sheets, I have the following formula: =if(REGEXMATCH(A1,B1),C1,"") The idea is that if any part of cell A1 contains the text listed in B1, then the output will be C1, otherwise, the cell is left blank. My issue is that I need to…
3
votes
1 answer

Vlookup Text Inside Query Results in Google Sheets

I'm trying to edit a sheet and use vlookup to get a text from another tab but I'm getting an #N/A error. What I would like to achieve is to get "March 1st" of the notes tab to G65 of the contacts tab. However, the data in the notes tab from columns…
3
votes
2 answers

Google Sheets linking two sheets using a primary key

I have two sheets that I want to link using a "primary key". At the moment, I have imported from sheet1 into sheet2 some columns using the function =Sheet1!A1 (for the first cell for instance). My purpose is to complete the data related to each…
3
votes
1 answer

Google Sheets Query Group By / First-N-Per-Group

I'm trying to find a simple solution for first-n-per-group. I have a table of data, first column dates and rest data. I want to group based around the date, as multiple entries per date are allowed. For the second column some numbers, but want the…
Jammo
  • 1,838
  • 4
  • 25
  • 39
3
votes
4 answers

How to use substitute function with query function in google spreadsheet

I am trying to use substitute function inside a query function but not able to find the correct syntax to do that. My use case is as follows. I have two columns Name and Salary. Values in these columns have comas ',' in them. I want to import these…
Rinaz Belhaj
  • 745
  • 1
  • 7
  • 20
3
votes
1 answer

Google Cloud Datastore: how to query all distinct Parent/Ancestor?

I have a Datastore Kind named Order, which has an ancestor/parent User. I'd like to query all distinct ancestors (users) of the orders using GQL, but the following query doesn't work. SELECT DISTINCT User FROM Order The query's response is: No…
3
votes
1 answer

QUERY function, containing string in the WHERE clause

I would like to copy and paste data from cells in columns A:D in sheet 1, onto sheet 2 only if the cells in Column F = yes I have tried to write the formula, but I keep getting parse errors. The formula I have tried to use…
3
votes
2 answers

OR logic and CONTAINS in a query in Google Sheets

I have a problem with an OR logic in a query. I'm trying to make a sum of a column (D), if: • column A = cars/build-price/carselector.html • column B = contains ateca or ibiza (the cell could be "get the ateca", "new ibiza xx", ...) • column C =…
Guillaume Hubert
  • 33
  • 1
  • 1
  • 5
3
votes
1 answer

Google Sheets FILTER() and QUERY() not working with SUM()

I'm trying to pull and sum data from one sheet on another. This is GA data being built into a report, so I have sessions split up by landing page and device type, and would like to group them in different ways. I usually use FILTER() for this sort…
3
votes
1 answer

Invalid query: SELECT_WITH_AND_WITHOUT_AGG in Google Query Language

I'm trying to create a piechart from a single column of data with the google visualization API by counting each value, but I keep getting the following error message: Invalid query: SELECT_WITH_AND_WITHOUT_AGG: C INFORMATION My spreadsheet can be…
Jonathan Bechtel
  • 3,497
  • 4
  • 43
  • 73
3
votes
1 answer

How to use date related function when data column is integer

This is a function to pull dividend information from Yahoo Finance. =importdata("http://real-chart.finance.yahoo.com/table.csv?s=T&a=1&b=1&c=2010&d="& month(today())&"&e="&DAY(today())&"&f="&year(today())&"&g=v&ignore=.csv") This returns... A …
Youngbin Lee
  • 45
  • 1
  • 6
3
votes
2 answers

Google query result without header

The following formula produces a 2-row result for me: a header row and a data row =QUERY(A1:I7,"select B,C where A=1",-1) I would like to have a single-row result: just data, without header. I found similar questions, but none of the answers are…
Andrej Adamenko
  • 1,650
  • 15
  • 31
3
votes
1 answer

Using promises for mulitple queries to Google sheets

I'm a beginner coder, and would like some help with speeding up my Google sheet queries. I have looked around a lot and cannot find a solution. I'm trying to run 25 queries to a Google sheet quickly, and this is how I'm trying it: Run a query to a…
3
votes
2 answers

Google sheet Query Function Returns blank result from cell with data

I am creating a spreadsheet for my work place that will find drivers for the LED's we use but I've run into a slight problem. i pull in the data from another sheet to thin it out, i then have a sheet for formulas, one for the form, and the data on…
Aaron Effinger
  • 43
  • 1
  • 1
  • 3
3
votes
2 answers

using both QUERY and FILTER together in a single statement?

I hope someone can help me; I am building some spreadsheets to help with time-tracking. I have a list of tasks, with columns for criteria including date, hours spent, category of work, and client. I want to filter this data by month, so for example…
Inigo
  • 8,110
  • 18
  • 62
  • 110