Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Google Sheets: one query for Sum and Filter?

$
0
0

If I have a sheet with data like this:

A    Bx    1y    2z    3x    4

I can sum the values with

=query(A:B, "select A, sum(B) group by A")

How can I then filter this result? For example, in SQL to see x and y only (excluding z), I would add a WHERE clause like:

WHERE A IN ('x', 'y')

How can I get this functionality in a Sheets query?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>