How to Use IF and CASE WHEN in MySQL Workbench SQL Tutorial

Поділитися
Вставка
  • Опубліковано 3 січ 2021
  • #mysql #case #if
    alphabench.com/data/mysql-cas...
    Please SUBSCRIBE:
    ua-cam.com/users/subscription_...
    Writing advanced queries in MySQL / SQL:
    Using If and CASE WHEN THEN to make decisions in MySQL
    Several applied examples using IF and CASE WHEN to do data analysis with MySQL
    Download the data used: github.com/mjmacarty/mysql

КОМЕНТАРІ • 24

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

    Thank you so much for this! You got a talent for teaching.

  • @AldairHoyos-zd8kc
    @AldairHoyos-zd8kc Рік тому

    Thanks a lot my friend! I understood everything from this tutorial. Cheers!

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

    Impressive ...easy to understand ..Thank you Macarty..

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

    Very well explained, thank you very much!

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

    Fantastic. Very easy to understand.

  • @pp-fr2qs
    @pp-fr2qs 2 роки тому

    Thanks this helped me a lot

  • @ooogabooga5111
    @ooogabooga5111 Рік тому +2

    I'm learning this for fun

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

      Glad it helped

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

      @@MattMacarty yeah I went from learning all your playlist, to trying to deploy the sakila database on planetscale and learned about scaling constraints with mysql and how vitess addresses it. Learned how to use DBeaver for data import and project management, I'm developing a website for a project and I was learning everything to do it in the right way from start. Thank You again :)

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

    btw the function DAYNAME() would've give the day name in a string format and not a number ! great content as always ~

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

      Thanks. For sure I would probably use DAYNAME, MONTHNAME in practice, but then I would not have been able to show CASE WHEN 😉

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

      @@MattMacarty great content.
      so, can we sort data with the use of dayname, monthname?

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

    hey man i want if stock less than export_qty appear a message the stock is not enough ?
    i try in mysql and sqlite3 but not work?

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

      Not sure I understand, but it sounds like you might try using an IF function?

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

    Hello, I can’t seem to find the stocks sql file on github . Could you put a link that leads to that directly, thanks

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

      I named it data.csv: github.com/mjmacarty/mysql/blob/main/data.csv

  • @user-bl5lh9pc7n
    @user-bl5lh9pc7n Рік тому

    where can i find the file to download?

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

      Looks like I forgot to post the link: github.com/mjmacarty/mysql