MySQL: ROLLUP

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 10

  • @BroCodez
    @BroCodez  2 года назад +8

    -- ROLLUP, extension of the GROUP BY clause
    -- produces another row and shows the grand-total (super-aggregate) value
    SELECT SUM(amount) AS "daily_sales", order_date
    FROM transactions
    GROUP BY order_date WITH ROLLUP;
    SELECT COUNT(transaction_id) AS "# of orders", order_date
    FROM transactions
    GROUP BY order_date WITH ROLLUP;
    SELECT COUNT(transaction_id) AS "# of orders", customer_id
    FROM transactions
    GROUP BY customer_id WITH ROLLUP;
    SELECT SUM(hourly_pay) AS "hourly_pay", employee_id
    FROM employees
    GROUP BY employee_id WITH ROLLUP;

  • @stanwaltz55
    @stanwaltz55 2 года назад +11

    youre legendary. Its really sad that you arent getting as much attention as you did before, but holy balls youre a legend.

  • @margin-fades
    @margin-fades 6 месяцев назад

    Great explanation. I was staring at a query and couldn't figure out what Rollup was doing. A minute into your video, I understood it.

  • @powerstrike9171
    @powerstrike9171 2 года назад +1

    I might share your video to my fellows, your videos are OG and represent true chad stuff. Thanks Bro!

  • @zxtqwwr0
    @zxtqwwr0 7 месяцев назад

    Thanks Bro you are a real giga chad for explaining it so easy and effortless

  • @kristijanlazarev
    @kristijanlazarev Год назад

    thnaks king

  • @kedarmalap
    @kedarmalap 2 года назад

    Hello Bro Code,
    Can you please make MERN stack full course playlist it would be more helpful if possible.

  • @mohamedthalif677
    @mohamedthalif677 2 года назад

    Hi Bro!
    I want to handle done button from browser generating popup.
    Let's say want to handle ok button that placed inside alert box!
    Please help me bro!

  • @secretr5024
    @secretr5024 2 года назад

    Have you seen lua?

  • @BummerSlug
    @BummerSlug Год назад

    I am just curious, how many other people Alias everything every time?
    Just me….dang it