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 :: psql show columns of table 
Sql :: how to alter length character varying postgres 
Sql :: how to remove default in mysql 
Sql :: oracle alter table delete column 
Sql :: date_trunc postgres 
Sql :: how to create table in sql 
Sql :: epoch time converter in snowflake 
Sql :: mysql does sentence contain word 
Sql :: buscar nombre de columna en todas las tablas sql server 
Sql :: mysql order by desc null last 
Sql :: how to use a database to see tables mysql 
Sql :: mysql procedures 
Sql :: python how escape sql 
Sql :: sql count having 
Sql :: Suse Linux restart MySQL 
Sql :: create index concurrently postgres 
Sql :: wordpress delete post revisions older than date "sql" 
Sql :: mysql query to check record exists in database table or not 
Sql :: how to add where command in update comand with joins 
Sql :: 2nd highest salary in mysql 
Sql :: sql add column to table 
Sql :: how to get nearest location in mysql with latitude and longitude 
Sql :: import large .sql files into lampp 
Sql :: SQL Auto Increment Primary Key - SQL Server 
Sql :: command line mysql xampp 
Sql :: t-sql merge example 
Sql :: sql query to list all tables in a database sql server 
Sql :: insert current date in mysql 
Sql :: sql server output parameter 
Sql :: oracle select first row order by 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =