HI
I think we can get the required output with the below query using qualify
select * from table_name
qualify row_number() over(partition by ordernum,name,zip order by start_date asc,end_date desc)=1
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.