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

Group By, multiple times?

$
0
0

I'm in the midst of creating some code to query my data.Here's an example of said data: enter image description here


Text version of image

NameToFAOF
Jon CenaBuyer1
Tim BrownSeller3
Cabel GuyBuyer5
Cabel GuySeller1
Cabel GuySeller1
Tim BrownBuyer1
Cabel GuyBuyer7
Tim BrownSeller1
Cabel GuySeller32
Tim BrownTrade1
Cabel GuySeller1
Tim BrownSeller1
Cabel GuySeller1
Tim BrownSeller1

currently I'm trying to group by more than 1 title, like this:

enter image description here


Text version of image

NameBuyerSellerTrade
John Cena100
Tim Brown1101
Cabel Guy3350

However no matter what I do, I can only query for either Buyer, Seller, or Trade and not all three, I don't know what the solution here would be at all! Here's what I have for my code

=query({listAll!A1:listAll!C1000}, " select Col1,sum(Col3) where Col1 <> '' and Col2 = 'Buyer' group by Col1 label sum(Col3) 'Buyer'",1)

I attempted every way possible I could think of like multiple group by lines, or multiple sum lines, however neither seems to work :( someone save me!

P.S Can't link to sheet because there's sensitive info on there I can't share!


Viewing all articles
Browse latest Browse all 9628

Trending Articles



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