Need some help on MYSQL query syntax, I am able to get last 60 records but wanted to exclude this week's record. I am trying following but can't able to figure out correct syntax.
select TIMESTAMP,ID,MAX,MIN from
(select TIMESTAMP,ID,MAX,MIN from db
where ID = 'A0101'
WHERE YEARweek(TIMESTAMP) =! YEARweek(current_DATE)
group by TIMESTAMP desc limit 60) t
order by TIMESTAMP asc
whereclause in one select? No error?