Explore BrainMass

Explore BrainMass

    SQL statements

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I am seeking help with solving several SQL statements.

    Table: Employee (for problems #1 and #2)

    EmpID Dept Salary HireDate SupervisorID
    1001 Finance 10,000 11/1/98 1020
    1002 Finance 15,000 12/12/96 1020
    1020 Finance 30,000 2/9/96 1035
    1015 Human Resources 20,000 3/15/01 1045
    1008 Operations 9,000 8/22/97 1013
    1010 Operations 12,000 7/9/01 1013
    1035 Operations 40,000 9/14/95 1000
    1007 Maintenance 5,000 10/7/01 1017
    1050 Human Resources 10,000 4/5/98 1045
    1000 Executive 60,000 11/25/93
    1016 Human Resources 11,000 10/13/01 1045

    1) Using table Employee, Delete all employees from the Finance department who make less than $20,000 and were hired during the year 2001.

    Please see attached

    © BrainMass Inc. brainmass.com March 4, 2021, 6:20 pm ad1c9bdddf
    https://brainmass.com/computer-science/sql/sql-statements-employees-40971

    Attachments

    Solution Preview

    DELETE FROM EMPLOYEE
    WHERE Dept = 'Finance'
    AND Salary < '20,000'
    AND HireDate BETWEEN '01/01/01' AND '12/31/01';

    Here we're assuming that "Salary" is stored as a string with ...

    Solution Summary

    SQL statements are assessed.

    $2.49

    ADVERTISEMENT