Functions | SQL | Tutorial 14

Поделиться
HTML-код
  • Опубликовано: 2 июл 2024
  • 🦒❤️ www.giraffeacademy.com/databa...

Комментарии • 43

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

    Thanks bro for your tutorials. They have been the best of all that I have tried to attach myself to. Keep us updated.
    Lots of appreciation to Giraffe Academy

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

    Thanks for sharing..very helpful! Love the "Office" employees! :)

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

    This is the coolest one.

  • @mrityunjayahiremath3951
    @mrityunjayahiremath3951 5 лет назад +8

    Mike Dane + SQL =

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

    This is Great. The best place to start SQL. Thanks Man!

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

      Unfortunately he titled it 14....so I am asking where is 1-13

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

      ruclips.net/video/2KbZ12RK_OI/видео.html I also tried explaining this topic. Please let me know any feedback.

  • @Be_Khaos
    @Be_Khaos 5 лет назад +3

    Fuck I'm an idiot.
    Mike at 3:57: "That's probably because David Wallace makes 250 grand a year."
    Me: David Wallace... Where do I know that from? Oh! The Office! Coincidence i guess. *Looks at the other names* Nope they're all there, I'm an idiot.

  • @jaigandhi9680
    @jaigandhi9680 4 года назад +5

    his code that was originally copied was birth_day not birth_date - make sure you know that

    • @zen123w
      @zen123w 4 года назад +2

      Mike is testing us to see if we are paying attention ;)

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

      @@zen123w yea, I was like why is mine not working??? I know it's in there right. Took me a min and I went back through the data LOL

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

    you're the best

  • @mohamed.montaser
    @mohamed.montaser 4 года назад +1

    you didn't use joins in the last example, how?

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

    this helps a lot!!

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

      ruclips.net/video/2KbZ12RK_OI/видео.html I also tried explaining this topic. Please let me know any feedback.

  • @thrang_eo
    @thrang_eo 5 лет назад +2

    ♥️♥️🙏

  • @myHellnet
    @myHellnet 4 года назад +4

    Hi, I'm following your series of tutorials and I have a question for you. I'm in this line of code
    SELECT SUM(total_sales), emp_id
    FROM works_with GROUP BY emp_id;
    the question is: how do i get the output of the name of the employee instead of their emp_id?. We are working on the works_with table but the name is in the employee table.

    • @myHellnet
      @myHellnet 4 года назад +6

      OK, nevermind, I got to the JOINS video tutorial (17) and solved it with this
      -------------------------------------------------------------------------------------------------------------
      SELECT employee.emp_id, employee.first_name, SUM(total_sales)
      FROM employee
      JOIN works_with
      ON employee.emp_id = works_with.emp_id
      GROUP BY employee.emp_id;

  • @skyblue021
    @skyblue021 5 лет назад +4

    Such a great tutorial!
    How to connect emp_id with their name from a different table?

    • @sadgabe
      @sadgabe 5 лет назад +4

      SELECT e.first_name, e.last_name FROM employee AS e WHERE emp_id = (SELECT emp_id FROM works_with);
      This would connect emp_id with works with and employee and return all employees who are included in the works_with table. You can do a nested query like this or a JOIN statement I believe for this.

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

      ruclips.net/video/2KbZ12RK_OI/видео.html I also tried explaining this topic. Please let me know any feedback.

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

    Awesome

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

    It must be good to work at Dunder Mifflin 😆

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

    >= '1971-01-01' or > '1970-12-31'

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

    How to find which employee sales high and which client buy more??

  • @jatindersingh-sw9ip
    @jatindersingh-sw9ip 3 года назад

    Could you make video on lowercase letters and uppercase

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

    I need more clarification on how to relate tables using SQL

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

    Gonna have to go through this again. I understand somewhat, but I don't understand why it works. :(

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

    Hi, I need that the values for a ColumnID, which is a Primary Key, to start at 100 and increment by 5. AUTO_Increment doesn't work in my case because it increases only by 1. How can I do that in MySQL? Hope you could help me. Thanks.

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

      Hi Zirely. Follow this tutorial www.tutorialspoint.com/mysql-what-is-auto-increment-5-in-a-create-table-query#:~:text=The%20AUTO_INCREMENT%3D5%20in%20a,starts%20from%201%20by%20default.
      in case you want to thanks or ask further, subscribe to my channel. I will help you.

  • @yuanfang8102
    @yuanfang8102 4 года назад

    The code of the last video has the following part:
    -- Find all employee's id's and names who were born after 1969
    SELECT emp_id, first_name, last_name
    FROM employee
    WHERE birth_day >= 1970-01-01;
    should it be WHERE birth_day >= 1970-01-01; or WHERE birth_day >= '1970-01-01'; (add a single quotes to 1970-01-01) ?

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

      obviously : >= '1971-01-01' or > '1970-12-31' and yes you need quotes since DATE FORMAT is rather String. Or else that would be a numeric sequence.

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

      ruclips.net/video/2KbZ12RK_OI/видео.html I also tried explaining this topic. Please let me know any feedback.

  • @mohitsinghania6714
    @mohitsinghania6714 5 лет назад +2

    Guest wants to display Resort Id, Name and Comments of the resort based on it's star rating.
    Comments of the resort displays as follows
    If rating is between 5.0 to 4.5 then display the comments as 'Excellent Resort'
    If rating is between 4.4 to 4.0 then display the comments as 'Very Good Resort'
    else display 'Good Resort' . Give alias name to this result as Comments.
    Sort the result based on resort id
    pls help me with this question and also help me with some tricks.

    • @sojtuber
      @sojtuber 4 года назад

      mysql
      m=mike
      y=youth
      s=structure
      q=query
      l=languag...

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

      Hey Mohit, let's connect it's very easy

  • @scottisitt
    @scottisitt 4 года назад

    7:22 Why did only only four employees show up in the table if there are nine employees from the works_with table?

    • @jaychang5631
      @jaychang5631 4 года назад +1

      maybe other employees are not salesman. BTW, seems the video use wrong group_by, should be "GROUP BY
      emp_id;" right?

    • @scottisitt
      @scottisitt 4 года назад

      @@jaychang5631 I see what it is now. Some of the employees are listed twice in the Works With table (for multiple sales).
      As for your comment about groups, he did use "GROUP BY emp_id"... If you pause at 7:22, it's there.

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

    On female employees born after 1971 I don't h=think we got the right answer there.

  • @F_Flex
    @F_Flex 2 года назад +1

    none of this is a function!!!