Question

I need this written in SQL

Employee EMP ID EMP FNAME EMP LNAME EMP STREET EMP CITY EMP STATE EMP ZIP EMP START DATE Table TABLE ID AREA IDTABLE SEATS ArQuestion 29 (10 points) Write an SQL query to list the employee ID and first and last names for all employees who are not sup

0 0
Add a comment Improve this question Transcribed image text
Answer #1
SELECT Employee.EMP_ID , Employee.EMP_FNAME , Employee.EMP_LNAME
FROM Employee
JOIN Area
ON Employee.EMP_ID != Area.AREA_SUPERVISIOR_EMPLOYEE_ID 
ORDER BY Employee.EMP_FNAME , Employee.EMP_LNAME ;

-------------------------------------------------------------------------------------------------------------------------------

Show List Column : Employee.EMP_ID , Employee.EMP_FNAME , Employee.EMP_LNAME .

Table name : Employee , Area .
For Find Supervisior or not : Employee.EMP_ID != Area.AREA_SUPERVISIOR_EMPLOYEE_ID (using join ).

First and Last name in alphbet order : ORDER BY Employee.EMP_FNAME , Employee.EMP_LNAME .(by defult its ascending order ).

Add a comment
Know the answer?
Add Answer to:
I need this written in SQL Employee EMP ID EMP FNAME EMP LNAME EMP STREET EMP...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write an sql query to list the customers last name, seating cost, seating tip and service...

    Write an sql query to list the customers last name, seating cost, seating tip and service date for all customers with last name Smith or jones or brown. SAMPLE DATA BASE (Key fields are underlined.) Employee EMP_ID EMP_FNAME EMP_LNAME EMP_STREET EMP_CITY EMP_STATE EMP_ZIP EMP_START_DATE Table TABLE D AREA ID TABLE SEATS Area AREA_ID AREA NAME AREA SUPERVISOR EMPLOYEE_ID Customer CUST ID CUST_LAST_NAME CUST_NUMBER_OF_GUESTS Assignment EMP ID TABLE ID Seating CUST_ID TABLE_ID SEATING COST SEATING DATE SEATING TIP

  • Write a T-SQL query to display the emp code, emp lname, employee job code, from the...

    Write a T-SQL query to display the emp code, emp lname, employee job code, from the employee table joining the job table where the employee job code equals the job table job code. Order the output by employee job code. Copy and paste the query and the output into your assignment document. (hint: use table aliases).

  • SQL query: Write an SQL query that will output the last name, employee id, hire date and department from the employee table. Pick only those employees whose department ID is specified in the employee...

    SQL query: Write an SQL query that will output the last name, employee id, hire date and department from the employee table. Pick only those employees whose department ID is specified in the employee table. If the employee id is 777, name is ABC and hire date is 01-JAN-2016, the output should look as follows - 'Stephen (Employee ID - 777) was hired on the 1st of January, 2016 – Department: 90'. Note - The date should not have preceding...

  • Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee...

    Please refer to the following business scenarios: (i) Using SELECT statements of SQL, find the employee id, first name, last name, job title and email of all employees working in Asia (i.e. all countries coming from the region     ‘Asia’). This query must be implemented as a nested query! (ii) Using SELECT statements of SQL, find the employee id, first name, last name, job title and supervisor id of employees who had worked for more than 3 years and completed...

  • Given CUSTOMERS = (SSN, fname, lname, cell pn, home pn, street, city, zip, state, free min,...

    Given CUSTOMERS = (SSN, fname, lname, cell pn, home pn, street, city, zip, state, free min, DOB, free SMS) RECORDS (from pn, to pn, start timestamp, duration, type) STATEMENTS (cell pn, start date, end date, total minutes, total SMS, amount due) PAYMENTS (cell pn, paid on, amount paid) DIRECTORY (pn, fname, lname, street, city, zip, state) pn is PK Provide queries in SQL 1.) List the full names of customers who has not made any calls for the last 7...

  • I have already turned in my HW, I need some understanding of the below SQL queries....

    I have already turned in my HW, I need some understanding of the below SQL queries. 1. Find the number of employees in each department. 2. List the names of departments that have more than 5 employees working there. 3. Retrieve the lowest and highest salary in each department. Output the department name in alphabetical order. Consider the following relational schema. An employee can work in more than on department; also, the percentTime field of the Works relations shows the...

  • DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE...

    DROP TABLE EMPLOYEE; DROP TABLE JOB; DROP TABLE EMP; DROP TABLE EMP_1; DROP TABLE EMP_2; CREATE TABLE JOB(JOB_CODE CHAR (3) PRIMARY KEY, JOB_DESCRIPTION VARCHAR (20) NOT NULL,JOB_CHG_HOUR NUMBER (5,2) NOT NULL,JOB_LAST_UPDATE DATE NOT NULL); INSERT INTO JOB VALUES('500','Programmer','35.75','20-Nov-2017'); INSERT INTO JOB VALUES('501','System Analyst','96.75','20-Nov-2017'); INSERT INTO JOB VALUES('502','Database Designer','125.00','24-Mar-2018'); CREATE TABLE EMPLOYEE(EMP_NUM CHAR (3) PRIMARY KEY,EMP_LNAME VARCHAR (15) NOT NULL,EMP_FNAME VARCHAR (15) NOT NULL, EMP_INITIAL CHAR (1),EMP_HIREDATE DATE NOT NULL,JOB_CODE CHAR (3), EMP_YEARS NUMBER (2),FOREIGN KEY (JOB_CODE) REFERENCES JOB (JOB_CODE)); INSERT...

  • Write a query to display author ID, author first, last name, and the number of subjects...

    Write a query to display author ID, author first, last name, and the number of subjects (book subject count) for authors who have published books in more than one subject area (book subject). CHECKOUT PATRON PK Pat ID FK1 Book Num FK2 Pat ID Check Out Date Check Due Date Check In Date Pat FName Pat LName Pat Type BOOK AUTHOR PK Au ID Book Title Book Year Book Cost Book Subject Au FName Au LName Au BirthYear FK1 Pat...

  • I need oracle SQL queries: Find the first name and last name of all staff who...

    I need oracle SQL queries: Find the first name and last name of all staff who are supervised by Wilma Smith and worked a breakfast meeting. Find the number of staff who worked at morning events. Hints: use start_hour. Also, keep in mind that a staff member may have worked more than 1 morning event. We are looking for a count of distinct staff. List the total staff cost of each event. Your query should display the location as well...

  • SQL- Microsoft Access List the employee number, employee last name, and pilot license type (if an...

    SQL - Microsoft Access --------------------------------------------------------------------- SQL- Microsoft Access List the employee number, employee last name, and pilot license type (if any) for all employees. (Hint: LEFT oUTER JOIN or OUTER JOIN must be used, because "if any"-some of them are not pilots). EMP NUM EMP TITLE EMP LNAME EMP FNAME EMP INITIAL EMP DOB EMP HIRE_DATE Click to Add 100 Mr 101 Ms. 102 Mr 103 Ms. 104 Mr 105 Mr 106 Mrs 107 Mr 108 Mr 109 Ms. 110...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT