order by and rownum in inner query
I've 2 linked tables A and B 1 to n For all records of A I'd like to have the record of B matching the following conditions A.dep=B.dep There is no record in B having the same year of A I want the maching record of B with the year beeing the latest year before the year of A If There is more than one record take the one with the latest updateDate If There is more than one record take the one with the latest creationDate If There is more than one record take the one with the latest Id I tried the Following Select ... FROM A ... left join B same on A.dep=same.dep and A.year=same.year left join B
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.