Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Hello! Filtering the dataset with last inserted values

User_CREPMMay 10 2022 — edited May 10 2022

Hello!
I ask for question about sql . I have a sql command like that :
SELECT P.ID_PERMIS,
P.PERMIS,
H.ID_HISTORIQUE,
H.DATEHISTORIQUE,
FROM EXPL_PERMIS P, EXPL_HISTORIQUEPERMIS H
WHERE P.ID_PERMIS=H.PERMIS_ID_PERMIS
ORDER BY ID_PERMIS, ID_HISTORIQUE;
and it return the following :
SQL2.JPGAnd I want to obtain the last ID_HISTORIQUE or DATEHISTORIQUE for every ID_PERMIS like that :
SQL3.JPG

This post has been answered by Frank Kulash on May 10 2022
Jump to Answer

Comments

Post Details

Added on May 10 2022
4 comments
65 views