having clause in sql | Oracle Database

preview_player
Показать описание
Oracle Database Full Course 👇👇

Don't forget to tag our Channel...!
#oracledatabase
#oracle
#sql
#havingclause
#sqlhavingclause
#groupbyclause
#sqlgroupbyclause
#sqlselectcommand
#oraclesql
#oracle11g
#ask4help
#LearnCoding

|| Content ||
1. voice 🔊 :- akhilesh
2. writer ✍ :- ankush

Thank You
👌👌👌
Рекомендации по теме
Комментарии
Автор

Last query is only reflecting the result with "WHERE" clause, where ESAL>20000. This is why the output is count of sales from (Row 7 & Row 10), count of HR (Row 5 and Row 11) and count of Product (Row 8).

Output:
HR 2 (Row 5 and Row 11)
Product 1 (Row 8)
Sale 2 (Row 7 & Row 10)

This query is not even considering the having clause. This tutorial is not serving its purpose "having clause in sql".

RavinderSingh-zxho
Автор

but having clause perform its operation only after groups are formed right then how you use it before GROUP answer

asharaju
Автор

Sir apki videos bahut acha hai ..mera frnds Sab apko hi follow kar rahe hain

khagendramohanta
Автор

Good Teacher ho ap very nice Beautiful AP ka bohat shakira ap mari zanding ma hay.Thanks Sir😍💐👍Thanks 22Jan I am Pakistani

villagelifemubashirsattar
Автор

Esme agr limit use krna h vo kause use hoga ? Plz btado sir

KavitaSharma-uhb
Автор

can we use having clause before group by statement??? My system is showing error in that code. If i use having statement after group by than the code is giving me correct result.

niteshdeshwal
Автор

Ok bhai makes some important mcqs of computers

apnateacher
Автор

Correct query should be:

SELECT DNAME, COUNT(DNAME), SUM(ESAL)
FROM EMP
WHERE ESAL > 20000
GROUP BY DNAME
HAVING SUM(ESAL)>25000;

OUTPUT:
DNAME COUNT(DNAME) SUM(ESAL)
HR 2 86000
SALE 2 62000

Only HR and SALE are the department with:
1. where ESAL is >20000
2. having sum of salary > 25000.

Hope it helps for the people who'll visit this video in future.

RavinderSingh-zxho
Автор

Sir sub query video nhi he kya mil nhi rha

subhrajyotipanda
Автор

Make a complete playlist on DSA with java

abdulrehman
Автор

Aapka video lazawab h sir adv. Java or android development par bhi video bna dijiye please🙏🙏🙏🙏

faiyazahmad
Автор

kindly make more such videos on sql interview questions.

bhartirajput
Автор

11:30 mein background mein paanipuri wala tha 😋😋

asifraza
Автор

Last vala query samjh nhi aya usme sum kaise aya ye btaiye

akshayshrivastava
Автор

U are great sir ...plz upload full java framework videos .thank you sir

khagendramohanta
Автор

2nd condition can be achieved by using "WHERE" clause as mentioned below:

SELECT DNAME, ESAL FROM EMP
WHERE ESAL >= 30000
group by NAME, ESAL;


Having clause was introduced coz where clause cannot be used with aggregate functions like having count(*), having(sum), having(max), having(Avg), etc. We cannot use where count(*), where(sum), where(max), etc. in SQL.

This is the main reason why we can't use 'where' in some places and 'having' clause was introduced.

RavinderSingh-zxho
Автор

Thanks bhya... Par mere mann mein ek sawal hai apka naam kya hai??

harshitkhemka
Автор

you are a great youtuber bro me hamesha apke sath rahunga
me har din mere dost ko keheta hu ki apki channel ko subscribe kare

drgamer
Автор

what is ASK change?
FDM, wDM and TDm what?

ziauddin
Автор

Do we use "where" with aggerate Function

Anumeha
visit shbcf.ru