Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 assistance with assignment

Author  Topic 

Mandlenkosi
Starting Member

1 Post

Posted - 2014-03-18 : 10:59:20
Good day. Please help with the following

Examine the structure of the employees and jobs tables. Display the names of all employees whose salaries form part of SA_MAN. wHICH sql statement give the required output?

1. SELECT first_name, last_name
FROM employees JOIN jobs
USING(salary BETWEEN min_salary NAD max_salary) AND job_id='SA_MAN'
2. SELECT first_name. last_name
FROM employees e JOIN jobs j
ON(salary BETWEEN min_salary AND max_salary AND job_id='SA_MAN';
3. SELECT distinct e.first_name, e.last_name, e.job_id,e.salary
FROM employees e JOIN jobs j
ON (e.salary BETWEEN j.min salary AND j. max_salary) and e.job_id='SA_MAN'
4. SELECT first_name, last_name
FROM employees e JOIN job j
WHERE e.salary BETWEEN j.min_salary AND j.max AND J.JOB_ID='SA_MAN'

Mandla

Monib
Starting Member

11 Posts

Posted - 2014-03-24 : 06:43:30
Option 3 is correct !!
Go to Top of Page
   

- Advertisement -