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

Sum across many rows with transposed formulas google sheets

I'm trying to build a formula that will count the total number of classes happening within a date range. This is the formula I can use, but it needs to include hundreds of rows (i.e. 'Class Counts' from B2 until B500 or so). Is there any way to turn…
2
votes
1 answer

Ignore case sensitive for given word

I have a search Query where I'm looking for values in my table. And I want to dynamically search for a value, for example, "AMAZON". ="select B, C, L, E, O, P, Q WHERE B >= date '"&TEXT(A2; "yyy-mm-dd")&"' and B <= date '"&TEXT(B2; "yyy-mm-dd")&"'…
2
votes
1 answer

Dynamic date function in Google sheets - how to implement it?

I was wondering if you could help me with a google sheets formula for the following issue: I am trying to use a dynamic date formula so that I could extract all the letters from column B that appear in the last 40 days to a different tab in the…
2
votes
1 answer

Use MAX() of a date in the Google Sheets query function, to get the value of another column

I have a table like this: id descripcion precio fecha 1 gomitas 5 1/2/2020 1 gomitas 2 2/3/2020 2 DRF 56 2/3/2020 3 BULLDOG 8 2/3/2020 1 gomitas 10 1/3/2020 3 BULLDOG 9 …
2
votes
1 answer

How to query(traverse) along a wide format table?

I have a table like that. I can't get my head around how to traverse(query selectively) through the countries and output data per date. Sometimes I need one country, sometimes 3 or 5. I just need to have a separate table where I'll have something…
2
votes
2 answers

How to skip a column when using array formula to generate content in Google Sheets?

I recently came across this spreadsheet in another question and made a copy. Here it is: https://docs.google.com/spreadsheets/d/14pCL0x-hlFyzWoW6-F8H33C6gJuYBv-p3NsjSvA5A0I/edit?usp=sharing What I want to do is skip column B using the array formula.…
2
votes
1 answer

How to do complex calculations inside query formulas?

In Google sheets, I get #NA with no explanation when I try to calculate the change between two sums - that I have just calculated in that same formula. Is that not possible using query or am I doing it wrong? My formula: =query(B5:H16,"select…
2
votes
3 answers

Select specific row and range of rows from specific columns with query

I have the following spreadsheet : | | A | B | C | D | E | | 1| Labels | Item 1 | Item 2 | Item 3 | Item 4 | | 2| name | yes | no | yes | yes | | 3| price | yes | no | yes | yes | | 4| tag |…
2
votes
2 answers

Google sheets "array_agg"... or equivalent? (join aggregation)

Currently, I have this =QUERY( QUERY( 'Raw Paste'!C2:E, "select C, count(C) where C is not null group by C order by C label count(C) ''" ), "WHERE Col2 >= 2") The second QUERY() is so I can filter the aggregate function like an SQL HAVING…
2
votes
2 answers

Marrying Query and Arrayformula through cell reference in Google Sheets

Trying to understand if it is possible to apply ARRAYFORMULA to situations when QUERY is used in Google Sheets. For example, I used QUERY for querying and aggregating a set of items, like so: =QUERY($H$2:$I$17,"select sum(I) where H='"&A2&"' label…
2
votes
2 answers

Google Sheet Query statement

Thanks in advance for any help. So here’s my dilemma, this is an example (copy) of a Google sheet with raw data in first tab and I’m trying to extract summary data onto the second…
2
votes
1 answer

QUERY with double condition in Google Sheets

I have a table similar to this A B C D E a1 b1 5 d1 a2 b2 5 d2 a3 b1 3 e1 a4 b3 4 e2 a5 b1 5 d3 e3 I'm trying to figure out a query that shows A,B,C,D if the value…
2
votes
2 answers

Get SUM from CATEGORY and by MONTH

So I'm trying to sort some data from a form in google sheets. I need to sort the data by category. and by the month. So far I have been able to sort these individually but not in the same cell. my code so far for my test form is below the…
2
votes
1 answer

Decimals in Query formula in Google Sheets

I'm trying to make a query formula. =QUERY(namedRange;"SELECT F WHERE 2.6 > D AND 2.6 < E") This works, but when I'm using a column reference like E7 it doesn't work. The value in E7 is 2,6. I know the comma breaks the…
2
votes
2 answers

How to make select with variable using Google Sheets

I have a Google sheet with several columns, where are recorded support requests from clients. A B C -+---------------+------------------------+------------- 1| Date-1 | John |…