Search
 
SCRIPT & CODE EXAMPLE
 

SQL

how to get data between a last week in mysql

SELECT id FROM tbl
WHERE date >= curdate() - INTERVAL DAYOFWEEK(curdate())+6 DAY
AND date < curdate() - INTERVAL DAYOFWEEK(curdate())-1 DAY
Comment

PREVIOUS NEXT
Code Example
Sql :: incorrect string value: mysql 
Sql :: contains word in sql 
Sql :: mysql concatenate select results 
Sql :: query saurce oracle 
Sql :: postgresql today - 1 year 
Sql :: postgres group by 10 minute intervals 
Sql :: postgresql alter table sequence 
Sql :: flask sqlalchemy default value 
Sql :: sql server pagination limit 
Sql :: sql add column after another column 
Sql :: get date ISO in psql 
Sql :: db.Database.SqlQuery 
Sql :: sql server: difference between hashtable and table declared using declare keyword 
Sql :: get comma separated values in sql server 
Sql :: mysql regex replace 
Sql :: mysql trim 
Sql :: change role postgres 
Sql :: check if string is a number sql 
Sql :: mysql select multiple rows into one column 
Sql :: how to update random rows in sql 
Sql :: mysql subdate 
Sql :: how to delete user in mysql 
Sql :: mysql delete all except 
Sql :: how to drop a table in mysql 
Sql :: compare date mysql 
Sql :: mysql replace remove html tag 
Sql :: sequelize migration default value 
Sql :: check if sql is installed 
Sql :: how to create a sql database 
Sql :: laravel jwt 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =