Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Identify what\'s wrong with the following queries, and show how you would fix it

ID: 3839584 • Letter: I

Question

Identify what's wrong with the following queries, and show how you would fix it:

Retrieve Tim Thomas's Employer(s). Tim's employeeID is 416.

SELECT employerName

FROM EmployeeEmployer, Employer

WHERE employeeID = 416;

The following data samples show a few rows from each table. For the questions that follow, assume that each table contains many more rows than are shown here. employee ID employeeFirstName employee LastName employee HomeCity employeeHomeState Smith Boston MA 1 John 2 Jane Boston MA NY Johnson 3 Sue New York Johnson New York 4 Tim Employee employerCity employer State employerID employer Name CA 1 Stark Industries Los Angeles 2 Initech Newark NJ CA Los Angeles 3 Acme Corporation NY 4 Wayne Enterprises New York City Employer employee Employerl employeelD employerlD date Hired 11 4 2005-08-05 22 2007-04-02 33 1 2006-05-09 4 1 2005- 11-25 EmployeeEmployer

Explanation / Answer

SELECT Employer.employerName

FROM EmployeeEmployer INNERJOIN Employer on EmployeeEmployer.employeeID = Employer.EmployerID where EmployeeEmployer.employeeID = 416

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote