java - i need to group years and select last five years with the averages of each year so that i have average and year output -


i need group years , select last 5 years averages of each year have average , year output

select ap, yr ( select year yr, avg( "tbltest.askingprice" ) ap tbltest group `yr` desc limit 5 )sub group `yr` asc  

select sub.yr, sub.ap (     select year yr, avg(askingprice) ap     tbltest     group yr     order yr desc     limit 0,5 ) sub order sub.yr asc 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

IIS->Tomcat Redirect: multiple worker with default -