Learn SQL | Danny Ma's 8 Week SQL Challenge Walkthrough | Case Study 2 Pizza Runner Section A

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ม.ค. 2025

ความคิดเห็น • 18

  • @nothingcanstopyou1086
    @nothingcanstopyou1086 ปีที่แล้ว

    Great learning experience keep it up lots of love and blessing from INDIA.

  • @fahimkasmani1474
    @fahimkasmani1474 6 หลายเดือนก่อน

    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'

  • @markusnormann2630
    @markusnormann2630 ปีที่แล้ว

    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!

  • @ninoshka81
    @ninoshka81 ปีที่แล้ว +1

    appreciate this a lot, i'm following the challenge with you

  • @FuturionStudios
    @FuturionStudios 2 หลายเดือนก่อน

    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

  • @pitou00
    @pitou00 ปีที่แล้ว +1

    THAT WAS HELPFUL WILL

  • @FuturionStudios
    @FuturionStudios หลายเดือนก่อน

    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

  • @amanojgenz
    @amanojgenz ปีที่แล้ว +1

    greate work

  • @FuturionStudios
    @FuturionStudios หลายเดือนก่อน

    Fo Q8 answer is 2 your order in order id 9 not showing

  • @FuturionStudios
    @FuturionStudios 2 หลายเดือนก่อน

    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

  • @ashutoshgusain1149
    @ashutoshgusain1149 6 หลายเดือนก่อน

    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!

  • @hollyquran0
    @hollyquran0 ปีที่แล้ว

    As for question number 10 these days they are not present in table 3, 5 and 6

  • @namandalsania
    @namandalsania ปีที่แล้ว

    Which editor are you using?

  • @nothingcanstopyou1086
    @nothingcanstopyou1086 ปีที่แล้ว

    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.

    • @blaze7515
      @blaze7515 10 หลายเดือนก่อน

      10 is correct, it should be on order_id.

  • @jam.8801
    @jam.8801 9 หลายเดือนก่อน

    appreciations