Kumaran P

Kumaran P

  • 2k
  • 102
  • 7.5k

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)