SQL Interview Problem - Solution - (Part - XIX) |

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • #education #sqlfordataengineer #sqlinterview #datascience #dataanalyst #dataanalytics
    Here are My profiles that will definitely help your preparation for data analyst or data engineer roles.
    Medium: / mahendraee204
    Github: github.com/mah...
    Table Creation and Insertion Statements:
    -----------------------------------------------------------------
    create table employees_info (
    empid int,
    empname varchar(20),
    department varchar(20),
    mgrid int,
    salary int,
    )
    insert into employees_info values
    (1, 'mahendra', 'IT', 10, 75000),
    (2, 'ravan', 'HR', 2, 60000),
    (3, 'sandeep', 'Finance', 7, 80000),
    (4, 'madhav', 'IT', 1, 72000),
    (5, 'ramesh', 'Marketing', 1, 68000),
    (6, 'arjun', 'Sales', 2, 71000),
    (7, 'vikram', 'Operations', 4, 67000),
    (8, 'ajay', 'IT', 10, 73000),
    (9, 'deepak', 'Finance', 7, 82000),
    (10, 'manish', 'HR', 2, 64000),
    (11, 'nilesh', 'Marketing', 5, 69000),
    (12, 'pradeep', 'Operations', 7, 76000),
    (13, 'suresh', 'Sales', 4, 78000),
    (14, 'ashok', 'Finance', 7, 80000),
    (15, 'gopal', 'IT', 1, 74000)

Komentáře • 2

  • @shinilkumar293
    @shinilkumar293 Před měsícem

    I think even for first question, where condition should include empid ! = mgrid
    For this specific table

    • @MeanLifeStudies
      @MeanLifeStudies  Před měsícem

      Yes. But not mentioned particularly. so Ravan has three employees including himself.