top of page

Day 5 of 30

  • bribrown11
  • Aug 16, 2022
  • 1 min read

I had to do something to lighten the load, so here's a meme.


A lot of people connected with this on LinkedIn, maybe it will ring true for you too.


I decided to make this fun little meme after I spent a few hours trying to figure out how to count how many times something showed up in a column in Big Query. I found tons of very complex queries that I couldn't understand let alone use.


Then I told myself, it doesn't have to be complicated, it just has to get the job done. So I figured out the following query will get the exact result that I'm looking for (without the frustration and complexity of more advanced queries).


--Count Home wins
SELECT count(outcome)
FROM (SELECT distinct(gameId), hometeamName, awayTeamName, homeFinalRuns, awayFinalRuns, IF((homefinalruns >awayfinalruns), 'win', 'loss') AS outcome
FROM `named-embassy-340811.Baseball.astros_home`)
WHERE outcome = "win"
-- Total Home wins = 43

 
 
 

Recent Posts

See All
Day 4 of 30

Familiarizing myself better with Google's BigQuery Today I wanted to practice more with BigQuery. I searched through Google's public...

 
 
 

Comments


Send Me a Message &
I'll Send One Back

  • LinkedIn

Thanks for submitting!

© 2022 by Brittany Brown. Proudly created with Wix.com

bottom of page