Kevin Haller5,940 Points
Mistake in task definition. The query wants to find out all orders, which were shipped today.
SELECT COUNT(*) AS "shipped_today" FROM orders WHERE shipped = DATE("now");
does yield a result of 0.
So <shipped> needs to have the value of "shipped" and we need to find the column with the numeric value of DATE("now"). The only column, that would come into consideration is <ordered_on>.
SELECT COUNT(*) AS "shipped_today" FROM orders WHERE ordered_on = DATE("now") AND status = "shipped";
yields the correct answer of 13 however, now we don't have all the orders that have been marked as "shipped" today, but all orders that have been marked as "ordered" today, which is a difference.
Am I right or do I miss something?