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

Query Select Row and Column together one statement

I work on a google sheet, where I should see the number of holidays per day for each team. The table looks like this: [table] A B C D E 1 Employee Name Team Name 01/03/2022 02/03/2022 03/03/2022 2 Employee 1 Team…
2
votes
2 answers

Is there any query string that I can use with the QUERY function to get a group-wise maximum?

I know how to use the GROUP BY clause in the QUERY function with either a single or multiple fields. This can return the single row per grouping with the maximum value for one of the fields. This page explains it nicely using these queries and…
2
votes
2 answers

Google Sheets Formula for combining dice rolls

The Situation: I'm creating a dice notation "Clean Up" formula, so that similar dice rolls are combined. For example: "1D6+1D6" would become "2d6". To complicate things, negative rolls (like "-1D6") can't be summed into the final result (Meaning,…
2
votes
2 answers

Query min column header while excluding blanks and handling duplicates

I have the following table. Name Score A Score B Score C Bob 8 6 Sue 9 12 9 Joe 11 2 Susan 7 9 10 Tim 10 12 4 Ellie 9 8 7 In my actual table there are about 2k rows. I am trying to get the min score (excluding blanks &…
2
votes
1 answer

Convert columns to rows and repeat row labels in google sheets

I am trying to convert table 1 to the format in table 2. How can I do it in google sheets ? Thank you very much. Table 1 - Table 2 -
2
votes
1 answer

Using IF on a list of outcomes and changing the value of the outcome

I'm trying to use the IF function to create a formula that answers TRUE based on multiple outcomes - I've definitely taken the wrong turn in the code I…
2
votes
1 answer

My QUERY+ARRAYFORMULA TEXTJOIN sheet doesn't show result as expected

I want to extract data from Column C (which contains about 1200 rows of numbers) that isn't appear inside Column B into Column E. So far i tried QUERY MATCHES and combined it with TEXTJOIN but it returned nothing. I also tried .* symbol but also…
2
votes
1 answer

How to run nested/subquery in google sheet?

SQl : select id,tod,count from new_temp where (id,count) in (select id,min(count) from new_temp group by id); i want to run this in google sheet. How i can run this ? [
2
votes
1 answer

Google Sheets SumIfs with left formula

I want to use the sumifs formula, but the sum interval range has text in it. Example: |Criteria|Sum Interval| |--------|------------| | A | 1 - Good | | A | 2 - Regular| | C | 3 - Bad | So, I want to check the criteria field…
2
votes
1 answer

sum SQL in google sheet query function doesn't add

I have been working on a sheet for a while and I would like to use the query function of google sheet for adding the amount of the ingredients of different meals, to create an 'overall' shopping list, but it seems to be that the numbers are not…
2
votes
1 answer

Make a list of incremented numbers from a set of numbers

I've been trying to write a formula to create a list from a given set of numbers. I tried to do this with "if" function but failed many times. The rule is to create a set of numbers by adding -2, -1 and +1, +2 to each number so that growing the…
J.J
  • 63
  • 5
2
votes
1 answer

Average use based on number of times an email address appears within a period

I have a small data set that I need to find the average number of times each individual user (email column B) appears within a defined period. In the sheet link I have the total number of times each user is recorded in column c. I can't just average…
Stuart
  • 315
  • 1
  • 8
2
votes
3 answers

Google Spreadsheet error Text result of TEXTJOIN is longer than the limit of 50000 characters

I am trying to combine cells and show in one cell as each cell contains product skus comma seperated. Need to combine these cells with comma seperator in seperate cell in same column. For this i am using =TEXTJOIN(",",TRUE,…
2
votes
2 answers

How to get max values for each unique value in a different column in Google Sheets?

I have two columns, the first column (A) has names and the second column (B) has values. A B apple 10 orange 12 orange 14 apple 8 Is there a way to get only rows with unique names from A AND max values from B? So the result should…
R2vale
  • 75
  • 2
  • 7
2
votes
1 answer

Evaluate a Google Sheets math expression with formula

I have some strings inside Google Sheets, containing simple arithmetic expressions: Is there a way to evaluate these expressions without the need for writing a script? (i.e. formula only)