No video

#9 SQL Having clause Explained | in Tamil | SQL A-Z tutorial series for beginners

  Рет қаралды 35,159

Error Makes Clever

Error Makes Clever

Күн бұрын

In the world of SQL, the `HAVING` clause is a powerful tool that helps us filter and manipulate data in a way that the `WHERE` clause can't quite manage. While the `WHERE` clause filters rows based on conditions applied to individual records, the `HAVING` clause comes into play when we want to filter the results of aggregated data, typically from `GROUP BY` operations.
Think of it like this: the `WHERE` clause is your gatekeeper for individual rows, deciding which rows make it into the result set. In contrast, the `HAVING` clause acts as a bouncer for aggregated data, letting you control which groups of data get to join the party in your final result set.
Here's what you'll learn in this video:
1. **The Basics**: I'll start by explaining the basic syntax of the `HAVING` clause and how it's used in conjunction with the `GROUP BY` clause.
2. **Aggregation**: We'll explore the power of aggregation functions like `SUM`, `COUNT`, `AVG`, and `MAX`, and see how they're often paired with `HAVING` to filter summarized data.
3. **Examples**: I'll provide real-world examples to illustrate when and why you'd want to use `HAVING`, such as finding customers who've made more than a certain number of purchases or products with a certain sales threshold.
4. **Comparison with WHERE**: We'll draw a clear distinction between the `HAVING` and `WHERE` clauses, so you'll know exactly when to use each.
By the end of this video, you'll have a solid grasp of how the `HAVING` clause is your go-to tool for filtering and shaping summarized data in SQL. It's a must-know for anyone working with databases, especially when dealing with reporting and analytics. So, if you're ready to level up your SQL skills, hit that play button and let's dive into the world of SQL's `HAVING` clause!
Don't forget to like this video, subscribe to our channel, and hit the notification bell to stay updated with more database tutorials and tips. Let's get started! 🚀

Пікірлер: 93
@user-uw8xb2op2m
@user-uw8xb2op2m 9 ай бұрын
* select avg(salary),count(*),department from employee group by department having avg(salary)>55000 or count(*)>2 ;*
@saimanasab7386
@saimanasab7386 2 ай бұрын
count(employee) thana varum?
@saimanasab7386
@saimanasab7386 2 ай бұрын
@@Manikandan-pq9dm question la count of employees more than 2 nu dha iruk so employees dha varum ig
@Laura-ih6je
@Laura-ih6je 2 ай бұрын
​​​@@Manikandan-pq9dm the second result is correct bro, in the first result you can use count(employee_id) if you want ,else it throws an error. select avg(salary),count(*), dept from employee group by dept having avg(salary) >55000 or count(*) >2 This works well and good for me. You can't use " employee " since it is the table name.
@misty9483
@misty9483 10 ай бұрын
Please upload remaining videos of SQL soon bro. Waiting for so long🥹
@ramakrishnanl4997
@ramakrishnanl4997 5 ай бұрын
Select department from employees group by department having avg(salary) > 55000 or count(employee_id) > 2;
@barath079
@barath079 11 ай бұрын
join and subquery pathi explain Pannunga bro waiting so far
@PriyankaKannan-zg3mi
@PriyankaKannan-zg3mi 3 ай бұрын
select avg(salary),department from employee group by department having avg(salary)>55000 limit 2
@issacdms8098
@issacdms8098 10 ай бұрын
Thank you for ur python course, it's use full form me 🙏🙏🙏Hi bro plz conduct full stack developer course it will be most helpful for me becoz ur teaching is easy to understand,
@emma_heartsquad
@emma_heartsquad 3 ай бұрын
Anna, when my mam taught me at school I did not get anything but you made me understand having clause in just 5 mins. Thank you so much😇 but what is the answer for this question 4:43 it's driving me mad with out the answer. I solved the first half of the question but I can't even understand the last part of the question. select avg(salary),dept from employee group by dept having avg(salary)>55000 [ I hope this is the answer for the first half🤓]
@Kanis_editz_
@Kanis_editz_ 3 ай бұрын
select avg(salary),count(department) from employee group by department having avg(salary)>55000 or count(*)>=2;
@Laura-ih6je
@Laura-ih6je 2 ай бұрын
select avg(salary),count(*), dept from employee group by dept having avg(salary) >55000 or count(*) >2
@swagprincess5547
@swagprincess5547 Ай бұрын
Count(*)>2 instead of use limit 2
@sumanprasad7283
@sumanprasad7283 10 ай бұрын
SELECT avg(salary), department from employee group by department having avg(salary)>$55000 limit 10;
@jjbala2198
@jjbala2198 8 ай бұрын
Bro can you explain why should we use limit 10 😢😢 I tried without limit it's actually worked
@Kanis_editz_
@Kanis_editz_ 3 ай бұрын
@@jjbala2198 because they are haing more than 2 employees..Instant of using this you can try this bro:select avg(salary),count(department) from employee group by department having avg(salary)>55000 or count(*)>=2;
@sanjaikumar867
@sanjaikumar867 10 ай бұрын
last question's answer: select department from employee group by department having avg(salary)>55000 || count(department)>2 Hope you all get this. Or else correct it if I'm wrong🙂
@devanathanelangovan4961
@devanathanelangovan4961 10 ай бұрын
I guess he has provided two requirements. Here they are, Select departments ( select avg(salary), departments from group by departments) from ; Select departments ( select count(*) as no_of_employees, departments from group by departments having no_of_employees >2) from ;
@Kanis_editz_
@Kanis_editz_ 3 ай бұрын
@@devanathanelangovan4961 select avg(salary),count(department) from employee group by department having avg(salary)>55000 or count(*)>=2;
@sanofficial24
@sanofficial24 10 ай бұрын
Bro Html And Css Video Detail ah Pottu irrukinga Learn panna Use full ah irruku So Apdye Java Script Konjam Detail ah Video podunga Bro ❤
@krishna-iq9dh
@krishna-iq9dh 11 ай бұрын
You are the best teacher
@its_shorts_time007
@its_shorts_time007 5 күн бұрын
Select avg(salary), department from employee group by department having avg(salary) > 55000 Result grid 61000,58500
@sivasankaris6186
@sivasankaris6186 4 ай бұрын
Select avg(sal),count(*)department from employees group by department having avg (salary)>55000 and count(*) > 2;
@praveenvenkatesh1903
@praveenvenkatesh1903 10 ай бұрын
Bro foreign key pathi podunga pls
@sharanraj8322
@sharanraj8322 Ай бұрын
select avg(salary),department from employee group by department order by avg(salary) asc limit 2
@syedashfaaqali1395
@syedashfaaqali1395 3 ай бұрын
select avg(salary) as avg_salary, department from employee group by department having avg_salary
@nivetha.12
@nivetha.12 10 ай бұрын
Answer for the question is select avg( salary), department from employee group by department having avg(salary)>55000 limit2
@itzz_Shan_
@itzz_Shan_ 4 ай бұрын
wrong
@nvsbflims4624
@nvsbflims4624 2 ай бұрын
bro completed is this correct select dept,avg(salary),count(dept) from employee group by dept having avg(salary) > 55000 or count(dept) > 2
@user-on3dk7dp6z
@user-on3dk7dp6z Ай бұрын
Select avg(sal) from employees Group by department Having avg(sal) < 55,000 or count (*)>2
@Lokiiiiiiiiiii
@Lokiiiiiiiiiii 10 ай бұрын
Javascript course podunga bro
@krishnapriyar5665
@krishnapriyar5665 10 ай бұрын
Please upload Java script playlist brother. Your way of teaching is Clear.
@adhi1666
@adhi1666 10 ай бұрын
Bro JavaScript video podunga pls
@arunazhagiri1908
@arunazhagiri1908 11 ай бұрын
After finishing thiss we want javascript bruhhhhhhh😢
@userashmitha
@userashmitha 10 ай бұрын
Bro..how to print prime numbers less than or equal to 1000 ..in mySQL intha ques CLR panu anna
@moideenfathima2751
@moideenfathima2751 10 ай бұрын
Anna nenga irukarathu nalla yenaku romba romba easya html css js kathukitta romba romba thanks And finally last request anna c & c++ Video poduvigala
@sanjaikumar867
@sanjaikumar867 10 ай бұрын
select avg(salary) from employee group by department order by avg(salary) asc limit =2
@not_reach_able_
@not_reach_able_ Ай бұрын
SELECT count(*) AS No_employees, department FROM EMPLOYEE GROUP BY DEPARTMENT HAVING No_employees>2
@asimparvesh
@asimparvesh 2 ай бұрын
Last Question Answer :- select avg(salary) , count(*), department from employee group by department having avg(salary) > 55000.0000 or count(*) > 2; Output: avg(salary) count(*) department 61000.0000 2 IT 58500.0000 2 FINANCE Reason: IT and Finance Department Has Average Salary more than 55,000 , So it is displayed. What about Departments with more than 2 Employees!!, Every Departments in the Data has only 2 Employees, So Even if you omit this Condition "count(*) > 2", The Output will be Same becoz there is No department with more than 2 Employees.
@narayananc.p1850
@narayananc.p1850 4 ай бұрын
select avg(salary),department from employee group by department having avg(salary)>55000 is the answer
@shamilahamed9929
@shamilahamed9929 10 ай бұрын
Bro fan request, pls upload C programming language 😢
@premap2859
@premap2859 22 күн бұрын
Bro nenga SQL Join pathi full video podunga bro
@harshitham1981
@harshitham1981 10 ай бұрын
Pls upload javascript workshop video
@user-jw6tb5hx1z
@user-jw6tb5hx1z 10 ай бұрын
Bro school students LinkedIn use pannalama bro school students eppadi use pandra dhu bro ........
@Its_Me_Anish_Shanker_The_Soul
@Its_Me_Anish_Shanker_The_Soul 10 ай бұрын
Bro data analytic full cours please make 💯 s
@sivaklr5023
@sivaklr5023 10 ай бұрын
Bro plz upload java series
@harshitham1981
@harshitham1981 10 ай бұрын
Upload javascript
@antonybrighton2396
@antonybrighton2396 2 ай бұрын
And clear.then how I can do it in mobile phone
@PraveenPraveen-oh1dh
@PraveenPraveen-oh1dh 10 ай бұрын
Bro javascript tutorial podu bro please
@Vishnu-rh1rx
@Vishnu-rh1rx 10 ай бұрын
Java script upload pannunga bro...
@mohammedalhan1793
@mohammedalhan1793 10 ай бұрын
Waiting for next part bro
@samuelm5766
@samuelm5766 11 ай бұрын
Thanks bro put next video asap
@victorsubbiah6077
@victorsubbiah6077 9 ай бұрын
do people use Version Control Software for SQL code? how do people keep version control of SQL code?
@priyadharshini4927
@priyadharshini4927 9 ай бұрын
Can you please explain Triggers ? It would be very useful for me !
@logeshkumaran4169
@logeshkumaran4169 11 ай бұрын
Super bro
@hariprasath8312
@hariprasath8312 7 ай бұрын
Select Count(EmployeeID),Department From Employee Group by Department Having avg(Salary)>55000 limit 2
@MasterJD-pz4lz
@MasterJD-pz4lz 6 ай бұрын
Wrong bro
@hariprasath8312
@hariprasath8312 6 ай бұрын
@@MasterJD-pz4lz ohh ok if you don't mind please explain.nanu therinchu kura
@balaji7204
@balaji7204 10 ай бұрын
Django framework using python sollithanga
@user-yo7in6nj4w
@user-yo7in6nj4w 10 ай бұрын
Bro...pls make a vedio on python about how to share one file contents into another file .....
@prabavathy.r7089
@prabavathy.r7089 10 ай бұрын
Hai anna please english fluent pesrathuku learn pandrathuku yethna website soluga anna. Roomba usefull ah irukum
@rifafahamed3911
@rifafahamed3911 10 ай бұрын
Bro security mechanicsem pathi video pooduga broo
@ShinChan_GS
@ShinChan_GS 10 ай бұрын
Bro Metaverse and game development job opportunities video podunga bro.
@antonybrighton2396
@antonybrighton2396 2 ай бұрын
Bro laptop illa enna bro pandrathu but I was study the theorically
@leena9698
@leena9698 10 ай бұрын
Integrating SQL in a PL/SQL program la integrating enna bro.????
@kishorevjsk7658
@kishorevjsk7658 10 ай бұрын
Broo RPA pathi solunga
@KARKABIL-bq5gi
@KARKABIL-bq5gi 10 ай бұрын
Bro EEE engineering finished next game developer enda course study pannanu video poduga bro
@user-el9vf3vn8l
@user-el9vf3vn8l 10 ай бұрын
sir video call application js how to create
@SaiKumar-tt2eo
@SaiKumar-tt2eo 10 ай бұрын
Bro Excel course poduga..
@abiabinaya3877
@abiabinaya3877 11 ай бұрын
why there is no JS video in your video list
@svijaykumar205
@svijaykumar205 10 ай бұрын
R Programming podunga bro
@v.yukeshwaranbca-7802
@v.yukeshwaranbca-7802 10 ай бұрын
Bro what about join command bro
@KLT_Sathish
@KLT_Sathish 4 ай бұрын
👏👏👏...
@janakiraman.v2002
@janakiraman.v2002 10 ай бұрын
Bro Java tutorial podunga
@user-db4pq1zz8o
@user-db4pq1zz8o 10 ай бұрын
Anna Networking Class edunga naa
@user-qc7fc4zr3f
@user-qc7fc4zr3f 7 ай бұрын
Why was the answer to the last question not provided? Are you trying to use your strategy to encourage joining your paid class? If the answer to the last question was provided, it would be useful to us.
@akashyuvaraj7275
@akashyuvaraj7275 6 ай бұрын
loose punda
@ABDURRAHMAN-rl8mh
@ABDURRAHMAN-rl8mh 7 ай бұрын
answer for last question?
@hennalis_2016
@hennalis_2016 11 ай бұрын
Javascript video podunga bro plssss😢😢
@thivyasona5496
@thivyasona5496 10 ай бұрын
Bro python ku pota mari varaha edachu oru language full ha poduga bro
@ilakiyasivakumar3814
@ilakiyasivakumar3814 11 ай бұрын
🎉 first comment
@chitthranjan
@chitthranjan 10 ай бұрын
Bro..pls put Java script video bro
@AnuSha-jn2si
@AnuSha-jn2si 10 ай бұрын
Bro c language poduga
@pavithrab9440
@pavithrab9440 10 ай бұрын
Hi bro pls do. Net
@rrocky20_
@rrocky20_ 10 ай бұрын
👍
@examtraining815
@examtraining815 7 ай бұрын
Hacking online course erutha soluga bro
@nonopno
@nonopno 10 ай бұрын
C# please😵
@balaji9477
@balaji9477 10 ай бұрын
Broooii
@badgamer444
@badgamer444 11 ай бұрын
Hii
@alokff420
@alokff420 10 ай бұрын
What is IT work? Anga yanna pannaum sollunga proo plss
@MasterJD-pz4lz
@MasterJD-pz4lz 6 ай бұрын
Coding !
@Saheel-bz4lu
@Saheel-bz4lu 10 ай бұрын
bro why courses not available ?
@shanmujs
@shanmujs 19 күн бұрын
select avg(salary),department from employee group by department having avg(salary)>55000 limit 2
Lehanga 🤣 #comedy #funny
00:31
Micky Makeover
Рет қаралды 30 МЛН
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,1 МЛН
#11 Understanding SQL Primary Key | SQL tutorial for beginners | in tamil
8:34