Quick syntax question..
868077Jun 10 2011 — edited Jun 11 2011Hi again,
3rd post today, just a quick one this time.
I need to write a query which identifies a list of employees from the employee table who have violated a set of given rules:
Rule 1. MOST EXPENSIVE CAR:
/Can be borrowed by: MANAGERS/SALES REP/HIGHEST EARNING EMPLOYEE IN EACH LOCATION.
/Car must be returned on the day it was borrowed.
Rule 2. LEAST EXPENSIVE CAR:
/Can be borrowed by: MANAGERS/SALES REP/HIGHEST EARNING EMPLOYEE IN EACH LOCATION
Rule 3. ALL OTHER CARS:
/Can be borrowed by: MANAGERS/SALES REPS WHO HAVE SOLD > £30000 OF GOODS.
I'm guessing I would use a case statement, have already built queries to find 1)Most expensive car 2) Least expensive car 3) Sales Reps earning over £30000.
I am just not sure of how to build tables based on information from 3/4 different tables.
Have literally just moved over to SQL developer after years of using MSAccess, annoying thing is I could do this in seconds with the access visual query editor..
Any help would be much appreciated. If any more info is needed please let me know.
Thanks.