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
1
vote
2 answers

Combine data across multiple sheets while keeping columns but ignoring blanks

I have three sheets in a workbook where people enter data (text values) in different columns, with different row lengths. For example: Sheet 1 Group 1 Group 2 Group…
geetee
  • 33
  • 5
1
vote
1 answer

Google sheets - Query + Importrange WHERE Clause doesn't accept AND for a second condition

I'm trying to pull a column of data from a file if two conditions are met. If I write the formula with one condition works perfectly =QUERY(IMPORTRANGE("url", "PIP!A2:S"), "SELECT Col2 WHERE Col3 = 'Schedule Change'") But if I add a second condition…
1
vote
1 answer

How to write a google sheets query for summing by columns

I've got a sheet where I'd like to sum each column B-D but filtered/grouped by the value in Column A. If I use a basic query like =QUERY(B1:N100, "select sum(B) where A = 'whatever'") then I get a single value out- the values in B, summed. How do I…
1
vote
2 answers

How to create a formula that will repeat a range by splitting one column and joining with the other column?

I have 2 columns, first name and surname. I want to split a cell that contains multiple values and then combine it with the cell on the right. I have no idea how to do this using a formula, please help. Before: First…
1
vote
1 answer

Filter/Query Check boxes

Is there a way when creating a filter or query function to include the check-boxed columns as is instead of True and False values? Thank you for your…
1
vote
1 answer

Automatically Combine Duplicate Value and Rank

In Google Sheets, I am trying to rank a table of people to find out who contributes the highest numbers. Sometimes one person contributes multiple times so I need to sum them up before ranking. The issue is the table will be updated with new names…
1
vote
1 answer

Text not read when using pd.read_csv() on a Google Sheet

I am trying to read a Google Sheet using pandas pd.read_csv(), however when the columns contain cells with text and other cells with numeric values, the text is not read. My code is: def build_sheet_url(doc_id, sheet_id): return…
1
vote
1 answer

Query Importrange with concat - adding 2 of the returned columns together

I am trying to import specified data using query importrange but at the same time I want to reduce need for additional calculation columns and by using concat or something similar to add 2 columns together with a space in between ie. first name…
1
vote
1 answer

Using query importrange to populate data from columns in specific column - to leave a column blank

I want to import data from one sheet to another using Query Importrange, however I want to select a column that should not be imported directly after the previous column import, for example; I select Col1, Col2,Col3,Col6 from sheet 1 but Col6 should…
1
vote
1 answer

How to combine select, label, where and date functions in Google Sheets

I have most of this query working, where it's pulling in what I want by the correct date, but I just can't seem to work the Label function in correctly to rename the columns. Here is the functioning query: =QUERY(Results!A1:I500,"SELECT B, A, F, G,…
Derek
  • 23
  • 3
1
vote
1 answer

Google Sheet Query SUM exclude all SUM equal zero

cracking brain for this. I have a very simple query with group and sum, and I want to exclude all sum results that are zero. My actual query is: =query(A:J;"SELECT D, SUM(I), SUM(H) WHERE C<>'S' GROUP BY D ORDER BY D DESC") So.. I know I cant do…
1
vote
1 answer

How to reference another range or cell as a string argument in query?

1.2.3 are working just fine because the operation is this: =QUERY({'ALL Leads'!$A:$R};"SELECT Col3 WHERE Col15= 'Zohra'";"") Now I want it to get me whatever is in column E10 ("Zohra" in this example) but apparently it's not working ! What do you…
1
vote
1 answer

Create Google Sheets chart based on amount of times date appears in the cell

Based on one cell with dates (some of them repeats multiple times): 06.02.2022 06.02.2022 08.02.2022 10.02.2022 17.02.2022 How to create the Google Sheets chart, where line goes up only when calendar day is exist in cell (and goes up multiply,…
1
vote
2 answers

Exclude 0's from arrayformula

=ArrayFormula({"Test"; query(value(CTA!C2:C)*0.8)}) How would I exclude the rest of the 0's in empty cells?
1
vote
1 answer

How to convert range text to number format when using QUERY and FILTER

I am using this formula in my example sheet to filter the 5 last columns of data in a chart: =INDEX(QUERY(TRANSPOSE(SORTN(TRANSPOSE(FILTER({B3:U3;B5:U7},B1:U1=A11,B2:U2=A12)),5,0,TRANSPOSE(FILTER(COLUMN(B1:U7),B1:U1=A11,B2:U2=A12)),0))&"","select…