SQL Tutorial: CASE WHEN with aggregate functions

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 9

  • @anon8563
    @anon8563 3 роки тому +9

    This solved an issue I was struggling with for days. Thank you very much. Oh and the quality of this video is insane. Very clean and "to the point". A lot of effort has put in to this. Thanks again

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

    wow! great explanation, you've saved my life!!!!

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

    Very best easy demo ...Thanks for sharing take care

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

    Why do you use (in 1:28 example) "count" with "then id end" just to calculate the number of rows matching condition? Wouldn't it be more logical to use "sum" and "then 1 else 0 end" (where "else 0" probably can be omitted as NULL counts as 0 I guess)?

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

    I have written case statement but added columns at the end of the query in group by clause. But records count was increased

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

    How to group by column 1 with in the case statement

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

    Could you help me one requirement I have to finish like column 1 has values 10,20, 10,30 etc and column 2 has 1 ,2,3,1,1 and how can we get count of column 1>1 multiply with count of column 2 >1 using case statement.
    Here 10*1=10 should come as alias column

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

    Hello and thanks for your effort to be honest your explanation needs an explanation you are just reading the slides,
    you didn’t mention anything about the mechanism of:
    COUNT
    SUM
    AVG
    What is the mechanism of the loop and how does it work and count when using aggregate functions with CASE statement. which is significantly important
    Thanks again

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

      This is an intermediate level SQL tutorial, what you’re asking for is introductory. Kindly check earlier videos for that.