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 format parameter 
Sql :: how to change mysql root password in windows 10 
Sql :: check postgresql port windows 
Sql :: date less than current date sql 
Sql :: sql get count without group by 
Sql :: where not in array sql 
Sql :: get last three characters in mysql column 
Sql :: get row affected mysql 
Sql :: create database collation 
Sql :: Select last row from SQL Table 
Sql :: set column to not null mysql 
Sql :: mysql update table from another table 
Sql :: nosql databases list 
Sql :: trim leading zeros in sql 
Sql :: oracle plsql sleep 
Sql :: where date in datetime mysql 
Sql :: sqlite create table if not exists 
Sql :: sql concat string with column value 
Sql :: how to sort names in alphabetical order in sql 
Sql :: locate sql server 
Sql :: get server date mysql 
Sql :: CX_Oracle - import data from Oracle to Pandas dataframe 
Sql :: sql identity column reset 
Sql :: Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates. 
Sql :: oracle convert int to date 
Sql :: show all tables postgres 
Sql :: SQL Modify Column in a Table -MySQL 
Sql :: insert current date sql 
Sql :: ms sql print from new line 
Sql :: oracle first row 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =