JOIN With GROUPBY | How to join tables with groupby | How to use groupby when joining multiple table
Вставка
- Опубліковано 3 лют 2022
- 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
can we use inner join in this ? or we will get wrong result on using inner join ?
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.
Can i use group by subscriber_id
Instead of group by 1,2,3,4 ??????
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.
@@thedatamillennials thanks alot 🤗
Subscribed
Welcome my dear friend
Thanks for subscribing our channel , really appreciate it. thanks
why left join
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.
you still didn't solve bro. haha there is still an error. wtf !
@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 🍻
@@thedatamillennials okay bro i will look into it.
Thanks @Ger B Manalo.
So complex oo God depressive
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