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

sql select data from last week

select id from tbname

where date between date_sub(now(),INTERVAL 1 WEEK) and now();
Comment

sql select data from last week

select id from tbname
where date between date_sub(now(),INTERVAL 1 WEEK) and now();
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 :: how to get weekday from old date in sql 
Sql :: NOT LIKE sql laravel 
Sql :: start mysql server using docker 
Sql :: mysql repair a table 
Sql :: sqlserver create table from select 
Sql :: SQL server query column yes or no 
Sql :: oracle update with sequence 
Sql :: how to print longest name in sql 
Sql :: drop table if exists 
Sql :: inner join in update query mysql 
Sql :: transalations from sql to Linq count and group by 
Sql :: ilike for date postgres 
Sql :: mariadb number format 
Sql :: postgres describe query 
Sql :: create table mysql 
Sql :: add user mysql wordpress 
Sql :: grant all priviledges to mysql user 
Sql :: oracle add datafile to tablespace 
Sql :: t sql check column exists 
Sql :: shell mysql connect 
Sql :: create table with select 
Sql :: search db for table name 
Sql :: a network or instance-specific error sql server 
Sql :: alter database name script 
Sql :: sql add column int nullable 
Sql :: nosql databases list 
Sql :: coalesce postgresql 
Sql :: mysqldump: Got error: 1045: Access denied for user 
Sql :: mysql add root password 
Sql :: column get from sql table 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =