Title: Query issue
Last modified: May 2, 2017

---

# Query issue

 *  Resolved [kopr](https://wordpress.org/support/users/kopernikus/)
 * (@kopernikus)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/)
 * This works:
    [gdoc key=”full_shared_google_spreadsheet_url” query=”select F”]
 * This works:
    [gdoc key=”full_shared_google_spreadsheet_url” query=”select max(
   O)”]
 * This does not:
    [gdoc key=”full_shared_google_spreadsheet_url” query=”select 
   F where max(O)”]
 * This is your example:
    [gdoc key=”ABCDEFG” query=”select A where max(B)”]
 * Question: What happen?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9089653)
 * If you want to understand the Google Query Language, you should ask this on the
   Google Spreadsheet product support forums. They can tell you more about what 
   happens during a GQL query.
 * If you are trying to accomplish something with this plugin, you should describe
   the problem you’re having and what you’re trying to accomplish.
    -  This reply was modified 9 years, 1 month ago by [Meitar](https://wordpress.org/support/users/meitar/).
 *  Thread Starter [kopr](https://wordpress.org/support/users/kopernikus/)
 * (@kopernikus)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9091263)
 * > If you are trying to accomplish something with this plugin, you should describe
   > the problem you’re having and what you’re trying to accomplish.
 * Ok, my bad, I thought it was obvious enough for you.
 * What I’m trying to accomplish with this plugin is simply to select rows which
   have maximum value which I did it by following your very instruction: query=**“
   select A where max(B)”**.
 * Just for the test I tried **“select F”** and **“max(O)”**, each of which worked
   perfectly. So, as per your instruction, in my case I tried **“select F where 
   max (O)”** then it failed and came up with error like “invalid query” or something.
 * Am I the only one who have this issue? If I am, is there any suggestion from 
   the plugin’s author about it?
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9091326)
 * That error means the query isn’t one Google understands, at least not on that
   dataset. Hence the error, “invalid query” (obviously?). My guess is you need 
   to add a [`GROUP BY` clause](https://developers.google.com/chart/interactive/docs/querylanguage#group-by),
   but it’s pretty hard to divine your intention without seeing your data. You should
   consider reading Google’s Google Query Language documentation.
    -  This reply was modified 9 years, 1 month ago by [Meitar](https://wordpress.org/support/users/meitar/).
      Reason: HTML, not Markdown. (Oops.)
 *  Thread Starter [kopr](https://wordpress.org/support/users/kopernikus/)
 * (@kopernikus)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9092320)
 * > That error means the query isn’t one Google understands, at least not on that
   > dataset. Hence the error, “invalid query” (obviously?).
 * But, I did nothing but copy-paste your example and change the cell. Where did
   I do wrong?
 * > My guess is you need to add a GROUP BY clause.
 * I did, still no luck.
 * > You should consider reading Google’s Google Query Language documentation.
 * Well, I did that, too. Do I need to read whole documentation or just focus on
   Aggregation Functions?
    -  This reply was modified 9 years, 1 month ago by [kopr](https://wordpress.org/support/users/kopernikus/).
 *  Plugin Author [Meitar](https://wordpress.org/support/users/meitar/)
 * (@meitar)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9093253)
 * ¯\_(ツ)_/¯ For the second time now, for support with Google’s products, post 
   on _Google_‘s product support forums.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Query issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/inline-google-spreadsheet-viewer.
   svg)
 * [Inline Google Spreadsheet Viewer](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/inline-google-spreadsheet-viewer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/)
 * [Active Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/inline-google-spreadsheet-viewer/reviews/)

## Tags

 * [max](https://wordpress.org/support/topic-tag/max/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [where](https://wordpress.org/support/topic-tag/where/)

 * 5 replies
 * 2 participants
 * Last reply from: [Meitar](https://wordpress.org/support/users/meitar/)
 * Last activity: [9 years, 1 month ago](https://wordpress.org/support/topic/query-issue-2/#post-9093253)
 * Status: resolved