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

Поділитися
Вставка
  • Опубліковано 5 жов 2024
  • 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 5 місяців тому

      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.

  • @sandeepparambath4469
    @sandeepparambath4469 3 роки тому +11

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

  • @raginikumari2290
    @raginikumari2290 3 роки тому +3

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

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

  • @jithin7822
    @jithin7822 3 роки тому +7

    Please do more on SQL query examples asked in interviews

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

  • @LordNegativePrime
    @LordNegativePrime 3 роки тому +4

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

  • @VinodKumar-ft1uc
    @VinodKumar-ft1uc 3 роки тому +4

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

  • @upendarreddy049
    @upendarreddy049 3 роки тому +3

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

  • @TylerNicoleTaylor_
    @TylerNicoleTaylor_ 3 роки тому +1

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

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

  • @javjersey
    @javjersey 2 роки тому +1

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

    • @ffproplayershere
      @ffproplayershere Рік тому +1

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

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

  • @datavizenthusiast3560
    @datavizenthusiast3560 3 роки тому +2

    wonderful lady ! thanks a lot !

  • @luiscastillo2610
    @luiscastillo2610 3 роки тому

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

  • @arbazkhan-od9sk
    @arbazkhan-od9sk 3 роки тому +1

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

  • @hayathbasha4519
    @hayathbasha4519 3 роки тому +3

    Useful one
    Learned something today 😇

  • @shahrukhahmad4127
    @shahrukhahmad4127 2 роки тому

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

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

  • @madhusudhanreddy8656
    @madhusudhanreddy8656 Рік тому

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

  • @akash_mishra565
    @akash_mishra565 3 роки тому +1

    Very well explained.. Thanks ❤️

  • @prasadyadav5759
    @prasadyadav5759 2 роки тому

    Awesome all doughts clear
    Thnx for the video👍👌

  • @charithgunathilaka
    @charithgunathilaka 3 роки тому +1

    great help with sql groups

  • @chakripalagorla9511
    @chakripalagorla9511 Рік тому

    Yes Thank you i understand clearly

  • @nikitajaiswal9112
    @nikitajaiswal9112 3 роки тому

    Best explanation in simple language

  • @patanshabbir8489
    @patanshabbir8489 2 роки тому

    Thanks. Nice explanation of concept.

  • @karamveersingh8532
    @karamveersingh8532 8 місяців тому

    Nice explanation. Thank you

  • @vishnuvamshi4645
    @vishnuvamshi4645 2 роки тому

    Make video on Difference between group by and partition by

  • @thefacts3627
    @thefacts3627 Рік тому

    thankyou didi for so beautiful explaination

  • @pranavbakare8922
    @pranavbakare8922 2 роки тому

    Cleared information Keep sharing......

  • @shamrajshan4355
    @shamrajshan4355 2 роки тому

    Really helpful to me nice explanation

  • @zt81
    @zt81 2 роки тому

    you are great at explaining!

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

  • @adityajacob2246
    @adityajacob2246 3 роки тому +3

    This was very helpful..thank you

  • @cmpunk8823
    @cmpunk8823 2 роки тому

    Thank you so much 🙂

  • @yogeshwaran1917
    @yogeshwaran1917 3 роки тому

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

  • @shiruc1168
    @shiruc1168 3 роки тому

    Your voice💕💕 thanx for teaching

  • @pavanbc3106
    @pavanbc3106 3 роки тому +1

    Thanks mam🎉

  • @rohitvijaywaghmare632
    @rohitvijaywaghmare632 3 роки тому +1

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

  • @meetvakani6734
    @meetvakani6734 2 роки тому

    Amazing. Thank you

  • @sopankardile2603
    @sopankardile2603 2 роки тому

    Thank you so much

  • @dogukansahin4865
    @dogukansahin4865 2 роки тому

    it was pretty clear, thanks

  • @loganmilkman7009
    @loganmilkman7009 2 роки тому

    Thanks for the video!

  • @gamingbomber-g3q
    @gamingbomber-g3q 11 місяців тому

    Great mam👍
    Keep doing good job

  • @higa4541
    @higa4541 2 роки тому

    Thankq thankq thankq sooo much ❤️🙏

  • @Createsofkaira19024
    @Createsofkaira19024 2 роки тому

    What is diff like sal

  • @sumityerme3811
    @sumityerme3811 2 роки тому

    Thanx Sadia mam

  • @snehalmagdum878
    @snehalmagdum878 3 роки тому

    You are amazing 🤩

  • @saurabhsawarkar3263
    @saurabhsawarkar3263 3 місяці тому

    3 year old video but best explanation

  • @praneethk3554
    @praneethk3554 3 роки тому +1

    Thanks Mam ! Wonderful explanation

  • @vikashr.dharmaratne3330
    @vikashr.dharmaratne3330 2 роки тому

    Thank you

  • @abhinavmishra7617
    @abhinavmishra7617 3 роки тому

    Good explanation

  • @mohsindkp3204
    @mohsindkp3204 2 роки тому

    You should mention table too

  • @jawariaalvi627
    @jawariaalvi627 3 роки тому

    Please also make videos on mongodb

  • @anuragbawankar685
    @anuragbawankar685 3 роки тому

    Thanks a lot !!!

  • @AmitGupta-fd3zy
    @AmitGupta-fd3zy 3 роки тому

    Thank you mam

  • @jeyhunaliyev1765
    @jeyhunaliyev1765 3 роки тому

    just awesome

  • @rk-ej9ep
    @rk-ej9ep 3 роки тому

    Great

  • @MoodyVideoGraphies
    @MoodyVideoGraphies 2 роки тому

    u r awsome.

  • @sivakrishnakongala5930
    @sivakrishnakongala5930 3 роки тому

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

  • @omkarmore7017
    @omkarmore7017 2 роки тому

    Is this grouping single column data grouping or multiple column grouping

  • @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 3 роки тому

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

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

  • @ramakrishnasamala4201
    @ramakrishnasamala4201 3 роки тому

    well expalined

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

  • @amankumarjha9438
    @amankumarjha9438 3 роки тому

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

  • @filterbot1229
    @filterbot1229 3 роки тому

    It's clear now😻

  • @gauravsawant5482
    @gauravsawant5482 2 роки тому

    please share notes also

  • @gampashivakumar
    @gampashivakumar 3 роки тому

    VERY UNDERSTANDING, THANK YOU

  • @mouneshts10
    @mouneshts10 3 роки тому

    It is very easy to remember thanks for this video

  • @DaCom3AK
    @DaCom3AK 2 роки тому

    Thank you for the concise explanation.

  • @Denisfutbol
    @Denisfutbol 3 роки тому

    go it. Thanks!

  • @sanazain2143
    @sanazain2143 3 роки тому

    which college you've studied ?

  • @punyabikash3624
    @punyabikash3624 3 роки тому

    Thank you keep going very helpful 👍

  • @suyogkale9922
    @suyogkale9922 3 роки тому

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

  • @kirangholap1931
    @kirangholap1931 2 роки тому

    👍👍

  • @karthikgolagani6844
    @karthikgolagani6844 3 роки тому

    secret sql superstar

  • @SuryaPrakash-me2qr
    @SuryaPrakash-me2qr 2 роки тому

    Good explanation thank you 🙂

  • @prasantamajumder888
    @prasantamajumder888 3 роки тому

    Thank you

  • @thilagavathya3436
    @thilagavathya3436 3 роки тому

    Nice explanation

  • @bhavanikandikondamatam5926
    @bhavanikandikondamatam5926 3 роки тому

    Thank you🙏🙏

  • @efashahira7053
    @efashahira7053 3 роки тому

    thanks a lot!!

  • @muhammednihas2218
    @muhammednihas2218 11 місяців тому

    thank you

  • @rupeshingale6849
    @rupeshingale6849 3 роки тому

    Thank you