I have a problem here in sorting of date that has some of entries are null I want the null values to be in the last row. I've already tried a solution found here in stack overflow the code is like this.

```
    SELECT * FROM table
    WHERE ...
    ORDER BY CASE WHEN date IS NULL THEN 1 ELSE 0 END, date ;

```

but it doesn't work at all it always give me a null value any idea?