I need to create a query to return the latest record per ID, prioritizing records where both
END_VAL are not
NULL if there are multiple records for the latest date.
My current query is:
SELECT * FROM MY_TABLE QUALIFY ROW_NUMBER() OVER (PARTITION BY ID ORDER BY LOAD_DATE DESC) = 1;
This query returns the latest record per ID, but does not prioritize records where
END_VAL are both not
NULL. Is there a way to define this sort of logic in the