(select concat('Podium: ',team)as name
from league
order by position
limit 3)
union all
(select concat('Demoted: ',team)as name
from league
where position>any(select count(*)-2 from league))
from league
order by position
limit 3)
union all
(select concat('Demoted: ',team)as name
from league
where position>any(select count(*)-2 from league))
This comment has been removed by the author.
ReplyDeletethanks
ReplyDelete(select concat('Podium: ',team) as name from league
ReplyDeletewhere position in (select position from league order by position limit 3))
union all
(select concat('Demoted: ',team) as name from league
where position in (select position from league order by position desc limit 2))