SQL Tutorial - 30: Using GROUP BY Clause with SQL JOINS

SQL Tutorial - 30: Using GROUP BY Clause with SQL JOINS

The Bad Tutorials

10 лет назад

97,993 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Jagan Mohan
Jagan Mohan - 09.11.2023 07:49

Can you please share a tutorial how to use joins on tables where tables are present in different data base using joins .....it will be very help full

Ответить
SHERU
SHERU - 07.11.2023 21:39

acha se samjha bv

Ответить
Irshaad Mohammed
Irshaad Mohammed - 24.01.2023 19:46

Hey bro dont lsiten to them, your voice isn;t annoying. your explanation is very clear and now I have a clearer concept of joins.

Ответить
Deepti Jain
Deepti Jain - 11.01.2023 08:29

Thank you

Ответить
Square Root
Square Root - 13.11.2021 03:13

This is why every single tutorial tells you to name variables with proper names. Most likely self-taught at the time.

Ответить
Patience M. TJANE
Patience M. TJANE - 15.08.2021 02:14

what do you use to execute your SQL statement ? it looks better than SQL command line

Ответить
xo hing yung
xo hing yung - 05.03.2021 21:54

Bakwass

Ответить
Yashvardhan giri
Yashvardhan giri - 03.03.2021 22:07

Thanks bro

Ответить
Leon Chan
Leon Chan - 08.01.2021 17:13

How do you find the number of groups (subjects) you have? For example, in this case, the answer will be three.

Ответить
IT REPORT CAMBODIA
IT REPORT CAMBODIA - 16.11.2020 10:35

hello b

Ответить
Amita Patil
Amita Patil - 11.02.2019 11:00

Why do you speak too much??

Ответить
John Robertson Nocos
John Robertson Nocos - 08.08.2018 17:05

Too much useless talk 😒

Ответить
Evaristo Luciano Correa
Evaristo Luciano Correa - 18.06.2018 16:59

Tables are not visible....

Ответить
shubh shubham
shubh shubham - 10.06.2017 04:08

you speak so much of unwanted things with a very irritating voice. The only reason I prefer your series is the good subject content. But please stop talking such a lot in vein.

Ответить
KRENT POSCO
KRENT POSCO - 15.02.2017 14:42

in case you want to avoid creating tables please refert these are the table



USE test ;
CREATE TABLE tutorial
(id int primary key, tittle nvarchar(30),Subject nvarchar(30),duration decimal(4,2) ,uploaddate date);

CREATE TABLE tutorial_info
(tutorial_id int primary key,Views int,likes int,dislikes int,shares int);

INSERT INTO tutorial (id,tittle,Subject,duration,uploaddate) VALUES
(1,'Select query','SQL',4.56,'2013-08-08'),
(2,'inser query','SQL',5.32,'2013-08-08'),
(3,'arithmetic operation','SQL',6.37,'2013-08-08'),
(4,'Logical operation','SQL',5.11,'2013-08-08'),
(5,'Order by clause','SQL',4.19,'2013-08-08'),
(6,'Function','C',5.23,'2013-04-04'),
(7,'Structure','C',4.26,'2013-04-04'),
(8,'While loop','C',8.13,'2013-04-04'),
(9,'For loop','C',5.30,'2013-04-04'),
(10,'Break statement','C',7.62,'2013-04-04'),
(11,'Continuous statement','C',6.56,'2013-04-04'),
(12,'Unions','C',3.21,'2013-04-04'),
(13,'Typedef','C',7.86,'2013-04-04'),
(14,'Is command','Shell script',3.19,'2013-01-01'),
(15,'Pwd command','Shell script',2.79,'2013-01-01'),
(16,'Grep command','Shell script',4.77,'2013-01-01'),
(17,'Who command','Shell script',6.13,'2013-01-01');


INSERT INTO tutorial_info(tutorial_id,Views,likes,dislikes,shares) VALUES
(1,15000,54,13,6),
(2,17500,43,21,2),
(3,12500,31,29,12),
(4,16000,17,0,11),
(5,85000,117,10,19),
(6,112000,191,46,34),
(7,85000,106,25,8),
(8,91000,166,24,17),
(9,191000,846,48,32),
(10,235000,1170,93,52),
(11,454000,2070,117,63),
(12,515000,2900,131,96),
(13,644000,3280,137,12),
(14,644000,3280,137,12),
(15,329000,1115,143,7),
(16,147589,650,22,3),
(17,22222,114,12,7),
(23,45000,650,131,11),
(24,57850,784,46,17),
(25,313000,1185,163,19);

Ответить
A E
A E - 21.07.2016 22:14

Code returns same results when using ( GROUP BY subject) instead of (GROUP BY t.subject)

Ответить
Suq Madiq
Suq Madiq - 13.08.2015 21:51

pretty cool how you combined them to show u the table like that

Ответить
Sandy
Sandy - 09.08.2015 17:26

what will happen if we put the exact command but not the last line i.e the group by command...???

Ответить
Nitesh Mishra
Nitesh Mishra - 04.08.2015 17:11

We can not perform join on two tables without giving Alias name ?

Ответить