20:11 Question 8 could be easily solved if we modify the customer table UPDATE pizza_runner.customer_orders SET exclusions = 'null' WHERE exclusions = ''; UPDATE pizza_runner.customer_orders SET extras= 'null' WHERE extras = ''; /*8. How many pizzas were delivered that had both exclusions and extras?*/ Select Count(c.order_id) as total_delivered From pizza_runner.customer_orders as c JOIN pizza_runner.runner_orders as r ON c.order_id=r.order_id Where pickup_time 'null' and exclusions 'null' AND extras 'null'
Hi Will, I've really enjoyed your video series - it's been fantastic! I have a small suggestion for you. Could you consider using the Ctrl + Enter shortcut to run your Snowflake queries? It might streamline your process a bit. Thanks again for the great content!
Dude your answer 3 is incorrect because we write code in a way so that it can work on even if we add some more data you take pickup time to check but what if a customer cancel after the order was cancelled means we have to make a query that search from cancellation for resturant cancellation and customer cancellation and give every other as output
Hey bro your question 7 is wrong too check in the tables the 103 customer ordered 4 pizza with changes and your only shows 3 because you use or so it means either this or that but there is an order of 103 which has both exclusions and extras which didn't follow or function that's why of it I used a simple case function for or and and both and simpilly minus changes from count(order_id) to get pizza without change
Hey man I checked this question but you didn't clean the data first there is duplicate and null values so the count result will be wrong as you didn't clean it
For 3rd question: SELECT runner_id, COUNT(runner_id) AS Delivered_orders FROM Runner_orders WHERE Duration > 0 GROUP BY runner_id I'm getting the same output as well. Can someone tell me is it correct or not? If not, please explain. Thanks!
Great learning experience keep it up lots of love and blessing from INDIA.
20:11 Question 8 could be easily solved if we modify the customer table
UPDATE pizza_runner.customer_orders
SET exclusions = 'null'
WHERE exclusions = '';
UPDATE pizza_runner.customer_orders
SET extras= 'null'
WHERE extras = '';
/*8. How many pizzas were delivered that had both exclusions and extras?*/
Select
Count(c.order_id) as total_delivered
From
pizza_runner.customer_orders as c
JOIN pizza_runner.runner_orders as r ON
c.order_id=r.order_id
Where pickup_time 'null' and exclusions 'null' AND extras 'null'
Hi Will, I've really enjoyed your video series - it's been fantastic! I have a small suggestion for you. Could you consider using the Ctrl + Enter shortcut to run your Snowflake queries? It might streamline your process a bit. Thanks again for the great content!
appreciate this a lot, i'm following the challenge with you
Dude your answer 3 is incorrect because we write code in a way so that it can work on even if we add some more data you take pickup time to check but what if a customer cancel after the order was cancelled means we have to make a query that search from cancellation for resturant cancellation and customer cancellation and give every other as output
THAT WAS HELPFUL WILL
Hey bro your question 7 is wrong too check in the tables the 103 customer ordered 4 pizza with changes and your only shows 3 because you use or so it means either this or that but there is an order of 103 which has both exclusions and extras which didn't follow or function that's why of it I used a simple case function for or and and both and simpilly minus changes from count(order_id) to get pizza without change
greate work
Fo Q8 answer is 2 your order in order id 9 not showing
Hey man I checked this question but you didn't clean the data first there is duplicate and null values so the count result will be wrong as you didn't clean it
For 3rd question:
SELECT runner_id, COUNT(runner_id) AS Delivered_orders
FROM Runner_orders
WHERE Duration > 0
GROUP BY runner_id
I'm getting the same output as well.
Can someone tell me is it correct or not? If not, please explain.
Thanks!
As for question number 10 these days they are not present in table 3, 5 and 6
Which editor are you using?
snowflake
2. How many unique customer orders were made? ans is 5 not 10, by mistaken you took distinct order id instead of customer_id rest code is good.
10 is correct, it should be on order_id.
appreciations