I'm having a little trouble figuring out this SQL statement. I have three tables employee
, job
, and job type
.
job type
is reference table. It has the name of the job, how long that job takes, and how much is charged for that job.
job
has records of what job was performed for what client by which employee and the date performed. It links to job type
jobname
.
employee
has name of employee, and employee id
. It links to job
table by employee id
.
I need to display a list of all employees as well as the cheapest and most expensive jobs they did for a given year.
I think I will probably have to have an embedded select and a few joins
. Maybe a union
The complexity is just too far out of my experience. I'm not even sure where to being to be honest.