sql - Google Spreadsheet QUERY() -


i use following query top 5 items table in google spreadsheets. revise query top 5 items , sum of rest of items in table not part of top 5. eg: 10 rows total, top 5 separate rows , sum of 6-10 1 separate row named other items. know how using tsql not work in subset of google query. familiar google subset appreciated.

thanks!

*also willing have 2 separate queries ideally should 1 single query.

=arrayformula(query($a$2:$g$24, "select a, g order g desc limit 5"))

this formula might work want:

={query($a$2:$g$24, "select a, g order g desc limit 5");"other items",sum(query($a$2:$g$24, "select g order g limit "&counta($a2:$a24)-5))}


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -