How to sort data using 2 conditions and keep the first set of data always at the top? I have a simple table:

id, status, date

When status is null, the date is also null. Question: how do I get my data that's always sorted by status = null and then sorted by date? The tricky part is, I would like to paginate through results, so I need to be able to use LIMIT and OFFSET with this query.
Use the ISNULL() function

SELECT * FROM mytable
ORDER BY ISNULL(status) DESC,date;


or

SELECT * FROM mytable
ORDER BY 1-ISNULL(status),date;


For pagination, you can reference id

SELECT B.* FROM
(
    SELECT id FROM mytable
    ORDER BY ISNULL(status) DESC,date
    LIMIT xxx OFFSET yyy
) A INNER JOIN mytable B USING (id)
ORDER BY ISNULL(B.date) DESC,B.date;