Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

bigquery get last month

#standardSQL
select 
  date_trunc(current_date(), month) - 1, 
  last_day(date_sub(current_date(), interval 1 month)),
  date_sub(last_day(current_date()), interval 1 month)
 
PREVIOUS NEXT
Tagged: #bigquery #month
ADD COMMENT
Topic
Name
8+5 =