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

Поделиться
HTML-код
  • Опубликовано: 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 🙏

  • @Amankumar-gp7su
    @Amankumar-gp7su 3 года назад +16

    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 3 месяца назад

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

  • @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.

  • @VinodKumar-ft1uc
    @VinodKumar-ft1uc 3 года назад +4

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

  • @jithin7822
    @jithin7822 3 года назад +7

    Please do more on SQL query examples asked in interviews

  • @TylerNicoleTaylor_
    @TylerNicoleTaylor_ 3 года назад +1

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

  • @raginikumari2290
    @raginikumari2290 3 года назад +3

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

  • @hayathbasha4519
    @hayathbasha4519 3 года назад +3

    Useful one
    Learned something today 😇

  • @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..

  • @pranavbakare8922
    @pranavbakare8922 2 года назад

    Cleared information Keep sharing......

  • @LordNegativePrime
    @LordNegativePrime 3 года назад +4

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

  • @arbazkhan-od9sk
    @arbazkhan-od9sk 3 года назад +1

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

  • @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...

  • @sandeepparambath4469
    @sandeepparambath4469 3 года назад +11

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

  • @datavizenthusiast3560
    @datavizenthusiast3560 3 года назад +2

    wonderful lady ! thanks a lot !

  • @prasadyadav5759
    @prasadyadav5759 2 года назад

    Awesome all doughts clear
    Thnx for the video👍👌

  • @upendarreddy049
    @upendarreddy049 3 года назад +3

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

  • @loganmilkman7009
    @loganmilkman7009 2 года назад

    Thanks for the video!

  • @gamingbomber-g3q
    @gamingbomber-g3q 9 месяцев назад

    Great mam👍
    Keep doing good job

  • @charithgunathilaka
    @charithgunathilaka 3 года назад +1

    great help with sql groups

  • @akash_mishra565
    @akash_mishra565 3 года назад +1

    Very well explained.. Thanks ❤️

  • @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

  • @patanshabbir8489
    @patanshabbir8489 2 года назад

    Thanks. Nice explanation of concept.

  • @chakripalagorla9511
    @chakripalagorla9511 Год назад

    Yes Thank you i understand clearly

  • @meetvakani6734
    @meetvakani6734 Год назад

    Amazing. Thank you

  • @shamrajshan4355
    @shamrajshan4355 2 года назад

    Really helpful to me nice explanation

  • @karamveersingh8532
    @karamveersingh8532 6 месяцев назад

    Nice explanation. Thank you

  • @jeyhunaliyev1765
    @jeyhunaliyev1765 3 года назад

    just awesome

  • @madhusudhanreddy8656
    @madhusudhanreddy8656 Год назад

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

  • @shahrukhahmad4127
    @shahrukhahmad4127 Год назад

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

  • @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 ..

  • @sopankardile2603
    @sopankardile2603 2 года назад

    Thank you so much

  • @shiruc1168
    @shiruc1168 3 года назад

    Your voice💕💕 thanx for teaching

  • @cmpunk8823
    @cmpunk8823 Год назад

    Thank you so much 🙂

  • @zt81
    @zt81 2 года назад

    you are great at explaining!

  • @snehalmagdum878
    @snehalmagdum878 2 года назад

    You are amazing 🤩

  • @sumityerme3811
    @sumityerme3811 Год назад

    Thanx Sadia mam

  • @nikitajaiswal9112
    @nikitajaiswal9112 2 года назад

    Best explanation in simple language

  • @abhinavmishra7617
    @abhinavmishra7617 2 года назад

    Good explanation

  • @MoodyVideoGraphies
    @MoodyVideoGraphies 2 года назад

    u r awsome.

  • @thilagavathya3436
    @thilagavathya3436 2 года назад

    Nice explanation

  • @Denisfutbol
    @Denisfutbol 3 года назад

    go it. Thanks!

  • @dogukansahin4865
    @dogukansahin4865 2 года назад

    it was pretty clear, thanks

  • @ramakrishnasamala4201
    @ramakrishnasamala4201 2 года назад

    well expalined

  • @pavanbc3106
    @pavanbc3106 3 года назад +1

    Thanks mam🎉

  • @anuragbawankar685
    @anuragbawankar685 3 года назад

    Thanks a lot !!!

  • @SuryaPrakash-me2qr
    @SuryaPrakash-me2qr Год назад

    Good explanation thank you 🙂

  • @vikashr.dharmaratne3330
    @vikashr.dharmaratne3330 2 года назад

    Thank you

  • @higa4541
    @higa4541 2 года назад

    Thankq thankq thankq sooo much ❤️🙏

  • @thefacts3627
    @thefacts3627 Год назад

    thankyou didi for so beautiful explaination

  • @muhammednihas2218
    @muhammednihas2218 9 месяцев назад

    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😅😅😂

  • @efashahira7053
    @efashahira7053 3 года назад

    thanks a lot!!

  • @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.

  • @rk-ej9ep
    @rk-ej9ep 3 года назад

    Great

  • @AmitGupta-fd3zy
    @AmitGupta-fd3zy 2 года назад

    Thank you mam

  • @bhavanikandikondamatam5926
    @bhavanikandikondamatam5926 3 года назад

    Thank you🙏🙏

  • @luiscastillo2610
    @luiscastillo2610 3 года назад

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

  • @filterbot1229
    @filterbot1229 3 года назад

    It's clear now😻

  • @adityajacob2246
    @adityajacob2246 3 года назад +3

    This was very helpful..thank you

  • @kirangholap1931
    @kirangholap1931 2 года назад

    👍👍

  • @educated.zombie
    @educated.zombie 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

  • @saurabhsawarkar3263
    @saurabhsawarkar3263 Месяц назад

    3 year old video but best explanation

  • @vishnuvamshi4645
    @vishnuvamshi4645 2 года назад

    Make video on Difference between group by and partition by

  • @sivakrishnakongala5930
    @sivakrishnakongala5930 2 года назад

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

  • @praneethk3554
    @praneethk3554 3 года назад +1

    Thanks Mam ! Wonderful explanation

  • @jawariaalvi627
    @jawariaalvi627 3 года назад

    Please also make videos on mongodb

  • @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

  • @Createsofkaira19024
    @Createsofkaira19024 2 года назад

    What is diff like sal

  • @omkarmore7017
    @omkarmore7017 2 года назад

    Is this grouping single column data grouping or multiple column grouping

  • @rohitvijaywaghmare632
    @rohitvijaywaghmare632 3 года назад +1

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

  • @yogeshwaran1917
    @yogeshwaran1917 3 года назад

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

  • @mohsindkp3204
    @mohsindkp3204 2 года назад

    You should mention table too

  • @karthikgolagani6844
    @karthikgolagani6844 3 года назад

    secret sql superstar

  • @punyabikash3624
    @punyabikash3624 3 года назад

    Thank you keep going very helpful 👍

  • @gampashivakumar
    @gampashivakumar 3 года назад

    VERY UNDERSTANDING, THANK YOU

  • @sanazain2143
    @sanazain2143 3 года назад

    which college you've studied ?

  • @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

  • @gauravsawant5482
    @gauravsawant5482 2 года назад

    please share notes also

  • @nagarajanerode
    @nagarajanerode 2 года назад

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

  • @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 2 года назад

      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

  • @prasantamajumder888
    @prasantamajumder888 3 года назад

    Thank you

  • @rupeshingale6849
    @rupeshingale6849 3 года назад

    Thank you