Search
 
SCRIPT & CODE EXAMPLE
 

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)
Comment

PREVIOUS NEXT
Code Example
Sql :: Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint 
Sql :: c# select Mysql 
Sql :: postgre insert select 
Sql :: sql left 
Sql :: show oracle parameters 
Sql :: into sql 
Sql :: nvl in oracle 
Sql :: QL HAVING Keyword 
Sql :: mysql biginteger size 
Sql :: How to insert Arabic characters into SQL database 
Sql :: full join sql 
Sql :: sql Split string function 
Sql :: sql power function 
Sql :: Upgrading postgresql data from 13 to 14 failed! 
Sql :: Selecting duplicates 
Sql :: get duplicate entry sql 
Sql :: sql last time database was accessed 
Sql :: t sql dynamic top n query 
Sql :: uncheck constraints and delete from table 
Sql :: sql find leading space 
Sql :: mysql not empty 
Sql :: move files from one folder to another in sql server 
Sql :: mysql not starting in xampp 
Sql :: set mysql password 
Sql :: PostgreSQL: To_Number function 
Sql :: mysql where in maintain order group_concat 
Sql :: php insert null mysql 
Sql :: sql server datetime 
Sql :: how to get column name in db from an sqlalchemy attribute model 
Sql :: Split JSON data in SQL Server column 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =