JOIN With GROUPBY | How to join tables with groupby | How to use groupby when joining multiple table

The SQL GROUP BY Statement
The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each country".
The GROUP BY statement is often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns.
You can follow us on the below social media handles:-
Blog: - thedatamillennials.blogspot.com/
Facebook:- / the-data-millennials-5...
Instagram: - / the_data_millennials
LinkedIn: - / data-millennials-6b5a0...
Twitter: - / datamillennials

Пікірлер: 17

  • @user-vw8pz9tg8t
    @user-vw8pz9tg8t Жыл бұрын

    can we use inner join in this ? or we will get wrong result on using inner join ?

  • @thedatamillennials

    @thedatamillennials

    7 ай бұрын

    you can use the inner join but INNER JOIN is used to combine rows from two or more tables based on a related column between them. The result set includes only the rows that have matching values in the specified columns in both tables.

  • @bbom9197
    @bbom9197 Жыл бұрын

    Can i use group by subscriber_id Instead of group by 1,2,3,4 ??????

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    Hi @BBOM, First of all apologies for delayed response. and yes my dear friend you can use group by subscriber id instead of group by 1. the only reason that we use group by 1,2..... in our query ,so that we do not have the write the full column name by which we want to group the data. Please do let me know incase if you have any issue with sql queries. And request you to please subscribe our channel for more such contents.

  • @bbom9197

    @bbom9197

    Жыл бұрын

    @@thedatamillennials thanks alot 🤗

  • @bbom9197

    @bbom9197

    Жыл бұрын

    Subscribed

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    Welcome my dear friend

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    Thanks for subscribing our channel , really appreciate it. thanks

  • @Ravij-jk2ex
    @Ravij-jk2ex Жыл бұрын

    why left join

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    Hi Ravi J, Apologies for delayed response. in this video we have used left join because most of the times in your day to day job you will have to use left join with group by by . and that's why I have used left join over here in the example. Please do let me know in case if oyu have any question or concerns.

  • @gerbmanalo2793
    @gerbmanalo2793 Жыл бұрын

    you still didn't solve bro. haha there is still an error. wtf !

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    @Ger B Manalo. Dude I think you have not seen the entire video and was so eager to comment that you missed the final output. I would request you to please go through the video once more and watch it till the end, and you will see that the question is solved. Anyways thanks for your postive criticism, we loved it and I would request you to please keep helping us sharings your views. And do let us know how can we improve our content. Cheers mate 🍻

  • @gerbmanalo2793

    @gerbmanalo2793

    Жыл бұрын

    @@thedatamillennials okay bro i will look into it.

  • @thedatamillennials

    @thedatamillennials

    Жыл бұрын

    Thanks @Ger B Manalo.

  • @malvikasinha9927
    @malvikasinha99275 ай бұрын

    So complex oo God depressive

  • @thedatamillennials

    @thedatamillennials

    5 ай бұрын

    Hi malvika Please let me know what makes you feel that joins in sql is complex and depressive, I will try to explain it in more simpler way Thanks in advance, and I will be waiting for your response