google-query-language

I got this message (CANNOT_GROUP_WITHOUT_AGG) from a simple query

筅森魡賤 提交于 2020-07-18 05:24:45
问题 I how to fix this error message? Unable to parse query string for Function QUERY parameter 2: CANNOT_GROUP_WITHOUT_AGG I got that error message just from a simple query formula, I already tried to search about it and try with the curly bracket { ... } but it doesn't fixed, Can anyone help me or ever experienced it? =QUERY(ANSWER!C:C, "SELECT * GROUP BY C", 0) 回答1: If you don't have an agreggation function (such as sum , avg , count in SELECT ), there is no use for GROUP BY - you may just

Is there a way to insert blank columns in output with google sheets query?

半腔热情 提交于 2020-06-27 08:11:40
问题 Consider the query run from sheet2 =query(Sheet!A7:A, "Select A,B,C where A='Order'") but I want to put this in columns A,E,F in Sheet2. I've found the workaround =query(Sheet!A7:A, "Select A,X,Y,Z,B,C where A='Order'") Where XYZ are blank columns from the end of the range. This seems clunky. So far searches in both the query syntax on Google docs, and google product forums have been unproductive. 回答1: Put the empty columns as literals in the query - cannot really be empty though, must

How to join tables using Query or Vlookup

时光毁灭记忆、已成空白 提交于 2020-02-08 10:16:10
问题 I have 2 sheets people sheet has [company first_name last_name full_name address_line1 address_city address_state address_zip address_country telephone email order_id order_date order_time processor order_type order_currency commission campaign_id] sales sheet has [DATE PROSPECT NAME EMAIL ADDRESS CONTACT METHOD PRODUCT RESULT NOTES ] How do I make the report to generate when people.email = sales.EMAIL ADDRESS and display the records only if they match (Not all of sales sheet) Report fields

Query Col1 > today()

亡梦爱人 提交于 2020-01-24 21:47:30
问题 When I use the format that I left below, returns in error, I know that something is missing adjusting in relation to WHERE AND ... But I could not fit to supply the error. I would like some help knowing what I missed. "select Col1,Col2,Col3 where Col1 is not null Order by Col1, Col2 AND Col1 > date'"&TEXT(today()-1,"yyyy/mm/dd")&"'" The date and time for Col1 and Col2 are like this: With this formula, I hope I can filter the imported data only for those that have the date of the current day

Google Query Spreadsheet: reverse transpose

隐身守侯 提交于 2020-01-24 01:53:14
问题 I have this table (as an example) id | a | b | c 1 | 23 | 13 | 56 2 | 67 | 45 | 3 | 43 | | 4 | 78 | 34 | 45 I want to upload transpose that using the query statement so that I can upload it to my database, the result should look like: 1 | 23 1 | 13 1 | 56 2 | 67 2 | 45 3 | 43 4 | 78 4 | 34 4 | 45 How would I do that? 回答1: Assuming you have the data in A:D, try: =ArrayFormula({transpose(split(query(rept(A:A&" ", if(len(B:B), countif(if(not(isblank(B:D)), row(B:B)), row(B:B)),)),,50000)," "))

Pass Custom Parameter to query.send Google Query Language

末鹿安然 提交于 2020-01-17 04:44:07
问题 I am using google's charts API to create a web-based dashboard. I want to draw many graphs and need to pass custom parameters to the handleDataQueryResponse function from this link: https://developers.google.com/chart/interactive/docs/spreadsheets#sheet-name. This function is called via a query.send(handleDataQueryResponse) call. I would have thought I could do this by calling: query.send(function() { handleDataQueryResponse(parameters) }); but this hasn't been working for me. Any ideas? Open

Select from two values after a 'where' statement

自闭症网瘾萝莉.ら 提交于 2020-01-06 05:47:35
问题 I'm trying to write a Select and Where query to search for an OR value after my Where statement. =query('Jigsaw Stories'!A:O,"select * where K OR L = '" & B5 & "'",-1) I get an error when putting in where K OR L . Extra note: The query works when I write it like this: =query('Jigsaw Stories'!A:O,"select * where K = '" & B5 & "'",-1) 回答1: =query('Jigsaw Stories'!A:O,"select * where K = '" & B5 & "'" OR L = '" & B5 & "'",-1) 来源: https://stackoverflow.com/questions/47188793/select-from-two

Google Sheets QUERY most recent unique entries

只愿长相守 提交于 2020-01-04 21:38:22
问题 I am trying to use the QUERY function on a list of Google Form responses to only display the most recent of unique entries(based on the key Student ID). A = Timestamp Column C = Student ID Column Using: select max(A) group by C I was able to get the right entries, but only one column for each( I want all the data, the whole row, from the right entries ) So I tried using: select max(A),B,C,D,E,F,G,H group by C But this gives an error Unable to parse query string for Function QUERY parameter 2: