Caleb Newell5,552 Points
Help with sql date
In an ecommerce database there's an orders table with the columns id, product_id, user_id, address_id, ordered_on, status and cost. Count the total number of orders that were ordered today and have the status of 'shipped'. Alias it to shipped_today.
SELECT COUNT(status) AS shipped_today FROM orders WHERE status = "shipped" AND orderd_on = DATE("now");
It sais there is something wrong with my code, but i do not see anything. Any help is highly appreciated 😁👍
Steven Parker201,999 Points
It's just a spelling error, you have "orderd_on" instead of "ordered_on".