title: Extracting Business Days and Business Day of Current Month in BigQuery
body: <p>I'm looking to do two things - I'm trying to a.) only extract business days within a month and b.) what business day it is of the month its in. </p>
  
  <p>So I know the business day portion can be done by using the DAYOFWEEK function and getting rid of all days that equal 1 or 7, but I'm a bit stumped on how to solve the business day of month portion. For example, today would be the 21st business day of this month, but the 21st business day of another month might not be the 29th, so it wouldn't make sense to compare that sort of way. It could be a weekend. For the purposes of making this simple, we don't need to worry about holidays that fall on a typical business day (i.e Memorial Day). </p>
  
  <p>So my goal is basically to have an output that gives you -</p>
  
  <p>Column 1: ID (lets just say this is some three character randomly generated alphanumeric ID)</p>
  
  <p>Column 2: start_date</p>
  
  <p>Column 3: Day of week</p>
  
  <p>Column 4: business day within start_date month</p>
  
  <p>Anyone have any advice?</p>