Databases Reporting with SQL Date and Time Functions Calculating Dates

Rose Mathurin
Rose Mathurin
2,882 Points

What am i doing wrong?

I have attempted this question sooooo many times and I'm not sure what I'm doing wrong... someone please help me. Here is my query:

SELECT COUNT(*) AS shipped_yesterday FROM orders WHERE status = "shipped" AND ordered_on = DATE("now", "-1 day");

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 34,366 Points

The alias for count(*) is ordered_yesterday_and_shipped. Make that change and you'll pass.