1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| WITH etudiant AS
(
select 'L3MIAGE' as diplome, 200 as idetu, 'Mathieu' as nom from dual union all
select 'L3MIAGE' , 400 , 'Thomas' from dual union all
select 'M1MECA' , 500 , 'Morgane' from dual union all
select 'M1MIAGE' , 100 , 'Maxime' from dual union all
select 'M2MIAGE' , 300 , 'Alix' from dual
)
SELECT nullif(et.diplome, lag(et.diplome) over(order by et.diplome ASC, et.idetu ASC)) as diplome,
et.idetu, et.nom
FROM etudiant et
ORDER BY et.diplome ASC, et.idetu ASC;
DIPLOME IDETU NOM
------- ------- --------
L3MIAGE 200 Mathieu
400 Thomas
M1MECA 500 Morgane
M1MIAGE 100 Maxime
M2MIAGE 300 Alix |
Partager