Re: sum top 5 question
i changed some code from that page to this
SELECT tmp.lidnr, tmp.dicipline
FROM (
SELECT
lidnr, dicipline,
IF( @prev <> lidnr, @rownum := 1, @rownum := @rownum+1 ) AS rank,
@prev := lidnr
FROM scores t
JOIN (SELECT @rownum := NULL, @prev := 0) AS r
ORDER BY t.lidnr
) AS tmp
WHERE tmp.rank <=5
ORDER BY lidnr, dicipline;
this works so far that i get a list from lidnr and dicipline but only one dicipline,
lidnr 220 has to dicipline but only one is showing in the list
what do i not seeing
Subject
Written By
Posted
Re: sum top 5 question
May 02, 2016 02:33AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.