I would probably use variables but then the order will different since than you will be comparing against the previous row.
set @olden:=NULL;
select year,entitle,
if(isnull(@olden),"n/a",if(entitle>@olden,"yes","no")) as higher,
@olden:=entitle
from table order by year;
Please note that assigning variables in a SELECT statement may not work in future MySQL versions
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…