I am attempting to use the Google Sheets query function to grab from another sheet that looks kind of like this:
What I wish is for a list of the racer winners and how many times they have won a race. My actual sheet is much wider with repeats of tracks and I am trying to see who has won at which track and how many times.
I have tried something like this:
=query({'SheetName'!1:998}, "Select Col1 where (Col2 = 1) or (Col3 = 1) or (Col4 = 1) or (Col5 = 1)")
Which does give me the list of racers who won, but obviously doesn't tell me how many times they have won.
So I tried: =query({'SheetName'!1:998}, "Select Col1, Count(Col1) where (Col2 = 1) or (Col3 = 1) or (Col4 = 1) or (Col5 = 1) group by Col1")
but that just returns the same list with a 1 next to each name.
Any help would be appreciated thanks!
EDIT: Here is a link to a more realistic demo sheet Sheet Maker sample sheet
Below is an example of what I would like the output to be based on me, using the above sheet, for the winners of Track 1.
Racers: | Wins: |
---|---|
Frank | 1 |
Larry | 1 |
Joe | 2 |
Edit 2: I have also made a second tab a where I show the attempts I have tried in the past