google-query-language

Using promises for mulitple queries to Google sheets

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 18:16:18
问题 I'm a beginner coder, and would like some help with speeding up my Google sheet queries. I have looked around a lot and cannot find a solution. I'm trying to run 25 queries to a Google sheet quickly, and this is how I'm trying it: Run a query to a Google sheet. Push the result to an array. Run a different query. Push the result to the same array. Run the next query... x 25. Draw a table of the final result. The problem is that if I run the quires one by one they take 25 seconds to complete.

Reference column based on multiple cell values in Google Query

拥有回忆 提交于 2019-12-08 12:53:08
问题 I'm trying to return a value in a column based on two cell references. My current query is: =QUERY(A:T,"select A WHERE P = '"&S200&"' AND Q = '"&T200&"'") Column A is a number, P is a string, and Q is a number. S and T correspond to P and Q, respectively. All it's returning is column headers. What am I doing wrong? 回答1: Try this, Note the different quotes for the cell number reference. =QUERY(A:T,"select A WHERE P = '"&S200&"' AND Q="&T200&"") 来源: https://stackoverflow.com/questions/46201053

Google Spreadsheets QUERY() to combine multiple sheets, same workbook

依然范特西╮ 提交于 2019-12-07 00:06:40
问题 Goal: I'm using QUERY() in gSheets to combine data from multiple sheets in the same workbook. The data is an extract from GA broken down into small segments to prevent sampling. This means it has all the same fields, I'm just piecing it back together for analysis. I would like to use QUERY() to do this because the data is hooked up to auto-update using the Google Analytics Sheets addon. The idea is that when it updates in the future it will piece itself together again and the analysis will

Google Spreadsheets QUERY() to combine multiple sheets, same workbook

一世执手 提交于 2019-12-05 05:54:04
Goal: I'm using QUERY() in gSheets to combine data from multiple sheets in the same workbook. The data is an extract from GA broken down into small segments to prevent sampling. This means it has all the same fields, I'm just piecing it back together for analysis. I would like to use QUERY() to do this because the data is hooked up to auto-update using the Google Analytics Sheets addon. The idea is that when it updates in the future it will piece itself together again and the analysis will run without any additional effort (or risk of human error) on our part. I followed the Google Support

Google Sheets Query Language: escape apostrophe

拥有回忆 提交于 2019-12-01 03:36:54
问题 How can I escape an apostrophe inside a SQL query in Google Sheets? Here's my function: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman's blabla: blablabla'"),"SELECT Col1, Col2") I've tried adding another apostrophe: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),"SELECT * WHERE Col2 = 'Woman''s blabla: blablabla'"),"SELECT Col1, Col2") No luck.. and I've tried putting a backslash, no luck as well: =QUERY(QUERY(IMPORTRANGE("XXXXXXX", "XXXXXX!A1:C"),

Using google query to download parts of a published sheet

女生的网名这么多〃 提交于 2019-11-30 16:20:02
问题 This works: curl 'https://docs.google.com/spreadsheets/d/e/2PACX-1vS3iBtVf4i_won5zAN9NGPqhcd6CcTb-4QHxpisSjCmlgV95B6mFmZvtMaC9GPvD7m8kD-6XLkVAhfc/pub?gid=911257845&single=true&output=csv' however I want to only pick up rows where count > 300. The query before encoding would be select * where F > 300 After encoding select%20*%20where%20F%3E300 So the url becomes https://docs.google.com/spreadsheets/d/e/2PACX-1vS3iBtVf4i_won5zAN9NGPqhcd6CcTb-4QHxpisSjCmlgV95B6mFmZvtMaC9GPvD7m8kD-6XLkVAhfc/pub

Google SpreadSheet Query: Can I remove column header?

折月煮酒 提交于 2019-11-29 20:32:38
I'm doing this query at my google spreadsheet: =QUERY(H4:L35;"select sum(L) where H='First Week'"; -1) But it returns a little table with "sum" as header and result below it. What I want is just the result! How I remove header? Can I? Try this: =QUERY(H4:L35,"select sum(L) where H='First Week' label sum(L) ''") Hope that Helps! user280150 =QUERY(QUERY(A1:D, "SELECT *", 1), "SELECT * OFFSET 1", 0) The outer query: "SELECT * OFFSET 1" excludes the first row (the header). The inner query explicitly specifies one row of headers (via the third argument supplied to QUERY ), whilst the outer query

Can the google spreadsheet 'query' function be used in google apps script?

核能气质少年 提交于 2019-11-27 16:13:43
问题 I'm looking for a way to programmatically populate a spreadsheet that filters data from another spreadsheet based on the logged in user. I am able to do this using the query function inside a spreadsheet. BUT, unable to figure out a way to call the query function from apps script? Can this be done? Would appreciate sample code. Thanks. 回答1: No, there is no API for the Query function that allows it to be called from Google Apps Script. (There is no way to call ANY spreadsheet function in this

Using Bound Google Scripts to Generate a Query Object

我的未来我决定 提交于 2019-11-27 15:25:39
I am using a Google Script bound to a Google Sheet to programatically generate the following query: =query('16 Jul - 20 Jul Responses'!A1:I31, "SELECT C WHERE D = 'Available'", 0) Is there any way in Google Scripts to parse an object representation of that query's results? I'd like to be able to code something like: var queryString = '=query('16 Jul - 20 Jul Responses'!A1:I31, "SELECT C WHERE D = 'Available'", 0)'; var results = new Query(queryString); for(var i = 0; i < results.length; i++) { var result = results[i]; // do something } As far as I can tell, the Query object doesn't exist

Google spreadsheet “=QUERY” join() equivalent function?

ⅰ亾dé卋堺 提交于 2019-11-27 10:55:38
This question is concerning joining two databases in Google spreadsheet using =QUERY function I have a table like so in range A1:C3 a d g b e h c f i I have another table c j m a k n b l o I want the final table to look like this a d g k n b e h l o c f i j m I can do this by using a vlookup function pretty easily in cell D1 and paste it down and across, but my dataset is huge. I would need a whole page of vlookups and Google Spreadsheet tells I'm at my limit in complexities. I look at the Google's Query Language reference... there doesn't seem to be an type of "join" functions mentioned. You