Questions tagged [google-sheets-query]

Use for question about the QUERY function of Google Sheets.

Use this tag for questions about the QUERY function of Google Sheets.

QUERY is a non-standard spreadsheet function. It uses Google Query Language

It could be used together with

Usually it will not be used with

1444 questions
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
1 answer

adding sheet name when importing multiple sheets using importrange

I am importing multiple sheets into one using importrange and query function. Each sheet belongs to a different person. Is it possible to show which person the imported row belongs to? I…
2
votes
2 answers

Google Query Language - Adding column on a group By

Excuse me this is my first post. I tried to make a nice table like others do but I struggled with the formatting Please consider the following spreadsheet: table image Google spreadsheet:…
2
votes
1 answer

How could I form a string of items grouped by a matching value? (e.g. "Red: Apples, Cherries")

I'm wondering if there is a decent way to do this (without scripts) - if not, I can attempt creating a script for it but some users of this sheet will be using Excel on their computers so I'm trying to keep it scriptless as much as possible. I have…
2
votes
1 answer

Custom aggregation of Finance data in Google sheets

I am currently working on a calculation to identify data trend on stock prices and is currently using google finance libraries for the same. I would like to compute the following information in an automated way. Percent of days with positive…
2
votes
1 answer

combining FILTER formula in Google Sheets

https://docs.google.com/spreadsheets/d/1St7OTtb69rj00qsq_C7vhtSD1VEUVUL9ekAmguBcc-M/edit?usp=sharing the case above shows: there are two tables of data (city and country) I can filter each of the data according to a certain category I can combine…
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
2 answers

Create rows from combination of other rows

I'm looking for a way to repeat records/rows based on two different tables, like below: TABLE 1: Col1 Col2 A 101 B 102 C 103 TABLE 2: Col3 1 2 3 REPEATING RESULTS: Col1 Col2 Col3 A 101 1 B 102 1 C 103 1 A …
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
1 answer

How to count the unique pairs in 2 columns and sort using the count using an ArrayFormula in Google Sheets?

Let's say I have the following spreadsheet: https://docs.google.com/spreadsheets/d/1FY7GnhZoT2_Tzm8FLOkDuc5XR8TkFhBJKgW_qZ1r4Cc/edit?usp=sharing On the top left column, I have a formula that counts the events and sorts them according to the…
2
votes
1 answer

Google Sheets formula to add column to array?

In Google Sheets I have a 2D array, with unpredictable size, returned by a Query: 08-02-2020 | Red 10-02-2020 | Brown 12-02-2020 | Green Now I'd like to add a third column containing the constant "Golf" to the array. For instance: 08-02-2020 | Red …
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

Why does Query drop values with dashes when using ImportRange in Google Sheets?

I'm using IMPORTRANGE() in Google Sheets to get some data from another spreadsheet. Authentication is done and it looks like everything is working fine. It WAS working fine till now and I have no clue what's going on. When I only use the…
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…