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

I got this message (CANNOT_GROUP_WITHOUT_AGG) from a simple query

I how to fix this error message? Unable to parse query string for Function QUERY parameter 2: CANNOT_GROUP_WITHOUT_AGG I got that error message just from a simple query formula, I already tried to search about it and try with the curly bracket {…
6
votes
1 answer

Skipping for Query

Recently I've found special word "skipping" which works in query. I accidentally found out about it. This formula works: =QUERY(A1:A11,"select A skipping 2") It skips 1 row, gives me rows 1, 3, 5, 7... and so on. Skipping 1 returns all the rows,…
Max Makhrov
  • 17,309
  • 5
  • 55
  • 81
5
votes
3 answers

Is there an equivalent, in Google Sheets, of Excel's Dynamic Array # operator?

I find one of the most useful aspects of Excel's new(-ish) Dynamic Arrays is that the # operator lets me refer to a range of cells where the number of rows is unknown (and liable to change). Is there anything equivalent in Google Sheets? For example…
tkp
  • 197
  • 7
5
votes
1 answer

Query with Median and Group by and where google sheets

I need to get the grouped median I have grouped data of the form From type Weight A person-person 4 A person-person 3 A person-organization 11 A person-person 5 A …
xyz333
  • 679
  • 6
  • 14
5
votes
2 answers

Query returning error Unable to parse query string for Function QUERY parameter 2: NO_COLUMN

I am currently working in the following spreadsheet https://docs.google.com/spreadsheets/d/13KfjUhWSB-BjGyC1G8f8i8o4SPd1kFFLkjN7D6VY8Lk/edit#gid=993210576 In which I am importing data from another worksheet using IMPORTRANGE, and writing a QUERY to…
5
votes
1 answer

Fastest way to search for a row in a large Google Sheet using/in Google Apps Script

GAS is quite powerful and you could write a full fledged web-app using a Google Sheet as the DB back-end. There are many reasons not to do this but I figure in some cases it is okay. I think the biggest issue will be performance issues when looking…
5
votes
1 answer

How to query results that don't contain the #N/A error in Google Sheets

I am trying to query results that don't contain #N/A results from another sheet in the same Google Sheets WorkSheet. I have tried this formula but it won't work =QUERY('Table 1'!A2:G500, "Select F Where G <> '#N/A'") Tried several other ways but…
5
votes
1 answer

How to compare dates or date against today with query on google sheets?

I'm working on making a replica of sheet1 on to another sheet2 (same document), and query() worked fine until the column i want to filter are formula cells (LONG ones each with query, match, etc). What i want to do is filter the rows in sheet1 where…
5
votes
2 answers

Why do I have to also SELECT an aggregate column to be able to use GROUP BY, if the only SELECTed column is already in GROUP BY?

In the data used by the formula below, column C contains a list of product titles (these are not unique, and many are blank); column Q contains the category for each product, and column F contains that product's sales. If possible, I'd like to avoid…
Lux
  • 325
  • 5
  • 16
5
votes
2 answers

Quotation marks and apostrophes in the same string in QUERY Google Sheets function

I'm wondering how one might handle a query like this. Let's suppose I had the following text contained in Cell A2 of a spreadsheet: Case Bakers' Flats 12" White Flour Tortillas 10/12ct and needed to put the following formula into…
LiamJC
  • 99
  • 1
  • 1
  • 11
5
votes
2 answers

Prevent blank column and line in the google query result

Doing the following query = QUERY(A2:C, "select B, avg(C) group by B pivot A") returns a correct summary of my source data. However, there is blank line and a blank column in the result (see example). How to get rid of them? I can deal with the…
jakub
  • 4,774
  • 4
  • 29
  • 46
4
votes
1 answer

Stacked chart with multiple categories stored in a SINGLE column – Google Sheets

I need to create a stacked column chart with Date aggregated on X-axis, and the bars with multiple (dynamically formed?) Category series. All of the examples out there demonstrate how to create the stacked graphs with the separate columns for each…
4
votes
2 answers

Exclude lines if ref and grade match in another sheets

It is the first time I am using Google sheet and I need to sort tables from two differents sheets. I want to keep only the ref that don't have a grade of A here is a link in google sheet…
marie
  • 211
  • 1
  • 3
  • 13
4
votes
1 answer

Always got Formula parse error when trying to use QUERY function on google sheet

I'm trying to select certain data from responses of a form on a google sheet. I just want to select all the data if one cell is equal to a specific word. I've created a new sheet inside the same archive, and tried with several…
isk27
  • 329
  • 2
  • 5
  • 13
4
votes
3 answers

case / if / filter / ? in google sheets query

I have a register that has all transactions with their account id. That register has a "Type" Field, on which I want to pull Summary Data. Transactions: | A | B | C | D …
trex005
  • 5,015
  • 4
  • 28
  • 41
1
2
3
74 75