While I was taking a technical exam for the position of database developer I faced a question :
Display all the details for species that are not covered by any specialty of employees working for zoos in England.
Tables:
Zoo: ZooName,City,Country,City
Animal: AnimalId,Species,ZooName,Gender,Dob
Employee:EmployeeId,FirstName,LastName,Gender
EmployeeContract: EmployeeId,ZooName,Salary,StartDate,EndDate
Species: Species,Status,TotalAnimals
Specialty:EmployeeId,Species
I didn't understood the part of the question which says "that are not covered by any specialty of employees". I believe there has to be left join between Species and Specialty table because we will find the species for which there is no employees against that species and basically that will be our species for which there is no employee but I am not sure whether I am thinking in a right direction or not.
I am finding hard to figure out the logic for this. Can anybody please explain me the logic for this, please