I'm in the midst of creating some code to query my data.Here's an example of said data:
Text version of image
Name | ToF | AOF |
---|---|---|
Jon Cena | Buyer | 1 |
Tim Brown | Seller | 3 |
Cabel Guy | Buyer | 5 |
Cabel Guy | Seller | 1 |
Cabel Guy | Seller | 1 |
Tim Brown | Buyer | 1 |
Cabel Guy | Buyer | 7 |
Tim Brown | Seller | 1 |
Cabel Guy | Seller | 32 |
Tim Brown | Trade | 1 |
Cabel Guy | Seller | 1 |
Tim Brown | Seller | 1 |
Cabel Guy | Seller | 1 |
Tim Brown | Seller | 1 |
currently I'm trying to group by more than 1 title, like this:
Text version of image
Name | Buyer | Seller | Trade |
---|---|---|---|
John Cena | 1 | 0 | 0 |
Tim Brown | 1 | 10 | 1 |
Cabel Guy | 3 | 35 | 0 |
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!