Skip to content
Advertisement

Filter data based on group SQL Netezza

Please I have the below table, I need to filter the data based on the DATE column, In the Sus_ID level if the DATE column has NULL get this row or if the hasn’t NULL record will get the row for the newest DATE

the desired result should be the below

I tried the below code but it didn’t work

Advertisement

Answer

Netezza supports the SQL Standard NULLS FIRST syntax. I would recommend that you use that:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement