Kumaran P

Kumaran P

  • NA
  • 102
  • 10.6k

My Sql Average Days sales

Apr 13 2018 2:23 AM
hi ,
 
i need last 5 Mondays average sales  
 
IF today Monday  
 
Like Monday 500 , Tuesday 500 , Wednesday 500 , Thursday 500 
 
am writing below query but we are unable to get the result 
 
some baby help 
 
SELECT DATE_ADD(day, INTERVAL (7 - DAYOFWEEK(day)) DAY) AS day, AVG(position) AS position FROM table 
 
 

Answers (1)