I am trying to sort my sql result with two columns but its not working for second column which is date.
I know may be there some solution posted before but I am not able to find that.
My query:
SELECT
order_id,order_name, delivery_date, created_at
FROM
orders
WHERE
store_client_id = '1192'
AND delivery_date != ''
ORDER BY
order_id DESC,
CAST('delivery_date' AS DATE) DESC
LIMIT 0,15
And result I am getting:
Order id is being sorted properly and date is not working.
Any help in this regard is highly appreciated in advance.