Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Write a SELECT statement that returns the LastName and JobTitle of eac.docx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité

Consultez-les par la suite

1 sur 1 Publicité

Write a SELECT statement that returns the LastName and JobTitle of eac.docx

Télécharger pour lire hors ligne

Write a SELECT statement that returns the LastName and JobTitle of each employee with a jobtitle other than ‘Engineer’ that has a SalaryWage greater than that of the lowest paid employee with a JobTitle of engineer.
This question is from Murachs SQL Server 2012 for developers (chapter 6 How to code subqueries).
The only answer posted on this site previously included results that were < that of the lowest paid engineer.
Solution
Hi, You have not mentioned Tables Name and thier schema.
So, i assumed here.
SELECT LastName, JobTitle
FROM Employe as e, Job as j
where (j.JobTitle not like \'Engineer\'
or j.SalaryWage < (select min(j1.SalaryWage)
From Job j1))
and e.id = j.id
.

Write a SELECT statement that returns the LastName and JobTitle of each employee with a jobtitle other than ‘Engineer’ that has a SalaryWage greater than that of the lowest paid employee with a JobTitle of engineer.
This question is from Murachs SQL Server 2012 for developers (chapter 6 How to code subqueries).
The only answer posted on this site previously included results that were < that of the lowest paid engineer.
Solution
Hi, You have not mentioned Tables Name and thier schema.
So, i assumed here.
SELECT LastName, JobTitle
FROM Employe as e, Job as j
where (j.JobTitle not like \'Engineer\'
or j.SalaryWage < (select min(j1.SalaryWage)
From Job j1))
and e.id = j.id
.

Publicité
Publicité

Plus De Contenu Connexe

Plus par drosa1 (20)

Plus récents (20)

Publicité

Write a SELECT statement that returns the LastName and JobTitle of eac.docx

  1. 1. Write a SELECT statement that returns the LastName and JobTitle of each employee with a jobtitle other than ‘Engineer’ that has a SalaryWage greater than that of the lowest paid employee with a JobTitle of engineer. This question is from Murachs SQL Server 2012 for developers (chapter 6 How to code subqueries). The only answer posted on this site previously included results that were < that of the lowest paid engineer. Solution Hi, You have not mentioned Tables Name and thier schema. So, i assumed here. SELECT LastName, JobTitle FROM Employe as e, Job as j where (j.JobTitle not like 'Engineer' or j.SalaryWage < (select min(j1.SalaryWage) From Job j1)) and e.id = j.id

×