Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql last week

select min(date), max(date)
from calendar
where week = datepart(week, getdate() - 7)
and year = datepart(year, getdate() - 7)
Comment

date sql get the last week count

select * from dt_table where  `date` >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
Comment

PREVIOUS NEXT
Code Example
Sql :: mariadb mysql root access denied 
Sql :: SQL DEFAULT Constraint With Alter Table 
Sql :: how to create a sql database 
Sql :: oracle revoke grant 
Sql :: mysql change timestamp on update 
Sql :: temp table vs variable table in sql server 
Sql :: check lock on table in sql server 
Sql :: excel export from sql using python 
Sql :: 1396(hy00) mysql error 
Sql :: add bool column in sql 
Sql :: SQL NOT BETWEEN Operator 
Sql :: sum query in sql 
Sql :: postgres extract day from date 
Sql :: difference between primary key and unique key 
Sql :: mysql add column to table 
Sql :: empty table sqlite 
Sql :: sql all 
Sql :: version and edition of SQL Server Database Engine 
Sql :: mysqldump with where clause 
Sql :: activate log mariadb 
Sql :: sql inner join with where clause 
Sql :: raiserror nowait sql server 
Sql :: sql server last 2 days 
Sql :: if column value is null then in mysql 
Sql :: mysql datetime with timezone offset 
Sql :: update sqlite 
Sql :: object dependencies in oracle 
Sql :: list table columns mysql 
Sql :: ms sql database data size 
Sql :: expo sqlite 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =