Difference Between WHERE and HAVING in SQL With Examples | Most Important Interview Question

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 เม.ย. 2021
  • Today's video, we'll discuss the difference between WHERE and HAVING clause in SQL.
    difference between where and having in sql server, where clause and having clause in sql explained with an example, difference between Having and Where Clause in SQL with example, where vs HAVING clause, SQL Interview Question, Must do SQL Interview Question.

ความคิดเห็น • 100

  • @crackconcepts
    @crackconcepts  3 ปีที่แล้ว +33

    Hope this video helped y’all.
    This is a question which a lot of you were confused about, so here’s the video.
    SUBSCRIBE TO HELP SUPPORT THE CHANNEL. THANKS 🙏

    • @anzimk1620
      @anzimk1620 3 ปีที่แล้ว +1

      Thank you so much maam.. Am new her... Ur Best

    • @RAVISINHA-jd9wq
      @RAVISINHA-jd9wq 3 ปีที่แล้ว

      Can We get videos on Java Concepts?

    • @kshtriyapride5124
      @kshtriyapride5124 3 ปีที่แล้ว

      Thank you so much

  • @Amankumar-gp7su
    @Amankumar-gp7su 3 ปีที่แล้ว +14

    Just a note : People say that HAVING cannot exists without group by ,but this is wrong. Having can exists without GROUP BY.when HAVING alone is used it's compulsory to use aggregate function. In the absence of group by HAVING will group entire table as one and applies aggregate function .
    Apart from it , well explained ,really liked it!!

    • @sadiahafeez1991
      @sadiahafeez1991 2 หลายเดือนก่อน

      Can we use having clause without aggregate function in group by clause?

  • @VinodKumar-ft1uc
    @VinodKumar-ft1uc 3 ปีที่แล้ว +4

    Hey Hi..!
    Its very Nice of you making videos by topic wise with Examples . Keep Going..!

  • @raginikumari2290
    @raginikumari2290 2 ปีที่แล้ว +3

    It was easily understandable, very neat and clean explanation with sweet and soft voice.. Thank you for your efforts.

  • @akashthakare2425
    @akashthakare2425 3 ปีที่แล้ว +8

    Your video's are good. I just started watching it and it is really helpfull.
    But I think if you use table and record that will help me more to clear concept. That's what I think and one's again thank you for making videos.

  • @asthasingh155
    @asthasingh155 3 ปีที่แล้ว +3

    Please do mention the SQL question for which you are creating the SQL queries, that helps more in understanding the condition (in WHERE and HAVING) and fields being pulled in your queries.... Thanks! Great videos..

  • @TylerNicoleTaylor_
    @TylerNicoleTaylor_ 3 ปีที่แล้ว +1

    Thank you! You explain things very well- concise but understandable. Please keep posting!

  • @hayathbasha4519
    @hayathbasha4519 3 ปีที่แล้ว +3

    Useful one
    Learned something today 😇

  • @AA-qd6xm
    @AA-qd6xm 3 ปีที่แล้ว +2

    It's day 1, I watched ur videos n it's amazing. Nice way to use Knowledge with dedication by using simple method to achieve great success...God bless you...keep it up...

  • @pranavbakare8922
    @pranavbakare8922 2 ปีที่แล้ว

    Cleared information Keep sharing......

  • @upendarreddy049
    @upendarreddy049 3 ปีที่แล้ว +3

    Thank you for making the best videos all the time. Please make a video on sql query optimization

  • @jithin7822
    @jithin7822 3 ปีที่แล้ว +7

    Please do more on SQL query examples asked in interviews

  • @arbazkhan-od9sk
    @arbazkhan-od9sk 3 ปีที่แล้ว +1

    I wish I found your videos earlier awesome explaination... keep up the good work

  • @LordNegativePrime
    @LordNegativePrime 3 ปีที่แล้ว +4

    Thanks a lot for making this videos, this help me a lot, you are awesome, greetings from Mexico.

  • @quotestown549
    @quotestown549 9 หลายเดือนก่อน

    Great mam👍
    Keep doing good job

  • @prasadyadav5759
    @prasadyadav5759 2 ปีที่แล้ว

    Awesome all doughts clear
    Thnx for the video👍👌

  • @datavizenthusiast3560
    @datavizenthusiast3560 3 ปีที่แล้ว +2

    wonderful lady ! thanks a lot !

  • @nayanshirose9866
    @nayanshirose9866 3 ปีที่แล้ว +2

    Thank you so much ma'am it is very easy to understand for me . Your video is very useful. Thanks again ma'am

  • @sandeepparambath4469
    @sandeepparambath4469 3 ปีที่แล้ว +11

    Thanks for this simple and understanding writing in the paper, short videos which were really helpful to understand the concepts.:)

  • @akshaychaudhari1529
    @akshaychaudhari1529 3 ปีที่แล้ว +4

    Hello I like youre all video ...
    Can you make video plz About ROWNUM ,partions.,over disting,
    And practical run...just as demo 🙏
    And youre all video nice 👍keep it up ..

  • @loganmilkman7009
    @loganmilkman7009 2 ปีที่แล้ว

    Thanks for the video!

  • @charithgunathilaka
    @charithgunathilaka 3 ปีที่แล้ว +1

    great help with sql groups

  • @patanshabbir8489
    @patanshabbir8489 2 ปีที่แล้ว

    Thanks. Nice explanation of concept.

  • @akash_mishra565
    @akash_mishra565 2 ปีที่แล้ว +1

    Very well explained.. Thanks ❤️

  • @shamrajshan4355
    @shamrajshan4355 2 ปีที่แล้ว

    Really helpful to me nice explanation

  • @chakripalagorla9511
    @chakripalagorla9511 ปีที่แล้ว

    Yes Thank you i understand clearly

  • @madhusudhanreddy8656
    @madhusudhanreddy8656 ปีที่แล้ว

    Your explanation is really awesome....Thank you so much❤

  • @karamveersingh8532
    @karamveersingh8532 5 หลายเดือนก่อน

    Nice explanation. Thank you

  • @shiruc1168
    @shiruc1168 3 ปีที่แล้ว

    Your voice💕💕 thanx for teaching

  • @indian7082
    @indian7082 3 ปีที่แล้ว +1

    Iam very much happy for your explanation 👍.
    Could you please prepare a video like joins . I got many interviews failed during sql only. Just now i subscribe your channel.

  • @nikitajaiswal9112
    @nikitajaiswal9112 2 ปีที่แล้ว

    Best explanation in simple language

  • @zt81
    @zt81 2 ปีที่แล้ว

    you are great at explaining!

  • @shahrukhahmad4127
    @shahrukhahmad4127 ปีที่แล้ว

    Thank you for short and easy explanation. God bless you ❤️

  • @meetvakani6734
    @meetvakani6734 ปีที่แล้ว

    Amazing. Thank you

  • @javjersey
    @javjersey 2 ปีที่แล้ว +1

    SOOOO INFORMATIVE AND CLEAR!! I get it now 😁😁Love your videos!!! Thank you from America!!🙏🏼🙏🏼🙏🏼

    • @sarvesh545
      @sarvesh545 ปีที่แล้ว +1

      Udhar ja ke bhi idhar ke video dekh raha hai😅😅😂

  • @dogukansahin4865
    @dogukansahin4865 2 ปีที่แล้ว

    it was pretty clear, thanks

  • @snehalmagdum878
    @snehalmagdum878 2 ปีที่แล้ว

    You are amazing 🤩

  • @cmpunk8823
    @cmpunk8823 ปีที่แล้ว

    Thank you so much 🙂

  • @jeyhunaliyev1765
    @jeyhunaliyev1765 3 ปีที่แล้ว

    just awesome

  • @SuryaPrakash-me2qr
    @SuryaPrakash-me2qr ปีที่แล้ว

    Good explanation thank you 🙂

  • @sopankardile2603
    @sopankardile2603 2 ปีที่แล้ว

    Thank you so much

  • @abhinavmishra7617
    @abhinavmishra7617 2 ปีที่แล้ว

    Good explanation

  • @thilagavathya3436
    @thilagavathya3436 2 ปีที่แล้ว

    Nice explanation

  • @higa4541
    @higa4541 2 ปีที่แล้ว

    Thankq thankq thankq sooo much ❤️🙏

  • @sumityerme3811
    @sumityerme3811 ปีที่แล้ว

    Thanx Sadia mam

  • @thefacts3627
    @thefacts3627 ปีที่แล้ว

    thankyou didi for so beautiful explaination

  • @MoodyVideoGraphies
    @MoodyVideoGraphies 2 ปีที่แล้ว

    u r awsome.

  • @Denisfutbol
    @Denisfutbol 3 ปีที่แล้ว

    go it. Thanks!

  • @rk-ej9ep
    @rk-ej9ep 3 ปีที่แล้ว

    Great

  • @luiscastillo2610
    @luiscastillo2610 2 ปีที่แล้ว

    the best explicacion i have ever seen until now, thanks to this asian woman

  • @prasantamajumder888
    @prasantamajumder888 2 ปีที่แล้ว

    Thank you

  • @anuragbawankar685
    @anuragbawankar685 3 ปีที่แล้ว

    Thanks a lot !!!

  • @pavanbc3106
    @pavanbc3106 3 ปีที่แล้ว +1

    Thanks mam🎉

  • @muhammednihas2218
    @muhammednihas2218 8 หลายเดือนก่อน

    thank you

  • @AmitGupta-fd3zy
    @AmitGupta-fd3zy 2 ปีที่แล้ว

    Thank you mam

  • @kirangholap1931
    @kirangholap1931 2 ปีที่แล้ว

    👍👍

  • @efashahira7053
    @efashahira7053 3 ปีที่แล้ว

    thanks a lot!!

  • @bhavanikandikondamatam5926
    @bhavanikandikondamatam5926 3 ปีที่แล้ว

    Thank you🙏🙏

  • @CosmicExplorerX1
    @CosmicExplorerX1 3 ปีที่แล้ว

    is there any way i can join simple join two tables , like just attach them side by side , no similarities no reference keys nothing just attach them side by side

  • @ramakrishnasamala4201
    @ramakrishnasamala4201 2 ปีที่แล้ว

    well expalined

  • @filterbot1229
    @filterbot1229 3 ปีที่แล้ว

    It's clear now😻

  • @adityajacob2246
    @adityajacob2246 3 ปีที่แล้ว +3

    This was very helpful..thank you

  • @vishnuvamshi4645
    @vishnuvamshi4645 2 ปีที่แล้ว

    Make video on Difference between group by and partition by

  • @Createsofkaira19024
    @Createsofkaira19024 2 ปีที่แล้ว

    What is diff like sal

  • @yogeshwaran1917
    @yogeshwaran1917 2 ปีที่แล้ว

    Hi....
    Plz give some examples of
    Power BI
    Database
    Group By
    Order By
    Bcz....of....interview qns.....

  • @sivakrishnakongala5930
    @sivakrishnakongala5930 2 ปีที่แล้ว

    having count >5000, means we will get data, if the same data(dup) is more than 5000 is it correct?

  • @jawariaalvi627
    @jawariaalvi627 3 ปีที่แล้ว

    Please also make videos on mongodb

  • @omkarmore7017
    @omkarmore7017 2 ปีที่แล้ว

    Is this grouping single column data grouping or multiple column grouping

  • @akshaychaudhari1529
    @akshaychaudhari1529 3 ปีที่แล้ว +2

    Delete duplicate rows from table ...
    How...plz sol this Question.. I try so many qurry but not run do you have any simple way...

    • @pavanbc3106
      @pavanbc3106 3 ปีที่แล้ว

      In a table there won't be any duplicate rows as I know

  • @saurabhsawarkar3263
    @saurabhsawarkar3263 หลายเดือนก่อน

    3 year old video but best explanation

  • @praneethk3554
    @praneethk3554 3 ปีที่แล้ว +1

    Thanks Mam ! Wonderful explanation

  • @mohsindkp3204
    @mohsindkp3204 2 ปีที่แล้ว

    You should mention table too

  • @rohitvijaywaghmare632
    @rohitvijaywaghmare632 3 ปีที่แล้ว +1

    Best explaination in simple language.. thank u🤙🤙🤙

  • @punyabikash3624
    @punyabikash3624 3 ปีที่แล้ว

    Thank you keep going very helpful 👍

  • @amankumarjha9438
    @amankumarjha9438 3 ปีที่แล้ว

    Hey sadia,why u didn't post any videos from last 1 month?

  • @maheshhari1226
    @maheshhari1226 3 ปีที่แล้ว

    select * from emp_bang
    where exists(select job from emp_hyd where emp_hyd.eid = emp_bang.eid );
    please explain this step by step madam......pls pls

  • @nagarajanerode
    @nagarajanerode 2 ปีที่แล้ว

    The having query shown should have the SUM(sal) i think

  • @gampashivakumar
    @gampashivakumar 3 ปีที่แล้ว

    VERY UNDERSTANDING, THANK YOU

  • @karthikgolagani6844
    @karthikgolagani6844 3 ปีที่แล้ว

    secret sql superstar

  • @sanazain2143
    @sanazain2143 3 ปีที่แล้ว

    which college you've studied ?

  • @gauravsawant5482
    @gauravsawant5482 2 ปีที่แล้ว

    please share notes also

  • @mouneshts10
    @mouneshts10 3 ปีที่แล้ว

    It is very easy to remember thanks for this video

  • @DaCom3AK
    @DaCom3AK 2 ปีที่แล้ว

    Thank you for the concise explanation.

  • @khushboogupta3585
    @khushboogupta3585 3 ปีที่แล้ว

    Hi, I have a quick question for getting the exact query for the following question:
    Product_Name , Product_Category , Date_of_sale
    ---------------------------------------------
    iphone7 Mobile 2017-10-01
    Samsung S8 Mobile 2017-10-02
    Fasttrack Watch 2018-01-03
    Titan Watch 2018-01-02
    Samsung S8 Mobile 2018-01-05
    iphone7 Mobile 2018-10-01
    Find list of product from each category which are sold latest/recently within that category?
    I have tried this query, just wanted to check with you if this is correct:
    Select product_name, product_category, date_of_sale
    from product_details
    where product_category, date_of_sale in
    (select product_category, max(date_of_sale) from product_details group by product_category)

    • @dssingh9955
      @dssingh9955 3 ปีที่แล้ว

      I think there is little mistake but I'm not very sure. Are you working somewhere ?

    • @dssingh9955
      @dssingh9955 3 ปีที่แล้ว +2

      Select product_name, product_category, date_of_sale from product_details where date_of sale in ( max(date_of_sale)) from product_details group by product_category)
      I think this will be correct but I'm not very sure please let me know if I'm correct or not.

    • @vaibhavverma1340
      @vaibhavverma1340 ปีที่แล้ว

      select product_Name , Product_category, max(date_of_sale)as recent_date from product_details
      group by product_Name , Product_category

  • @suyogkale9922
    @suyogkale9922 2 ปีที่แล้ว

    Very Good for understanding.
    But you can explain In hindi and after explaining the point kindly do on practical demo

  • @vikashr.dharmaratne3330
    @vikashr.dharmaratne3330 2 ปีที่แล้ว

    Thank you

  • @rupeshingale6849
    @rupeshingale6849 3 ปีที่แล้ว

    Thank you