- 1
Find all the male employees born between 1962 to 1970 and with hire date greater than 2001 and female employees born between 1972 and 1975 and hire date between 2001 and 2002.
3 Réponses
+ 1
This will probably require table joining, how should one answer the question without knowing which tables are involved and their structure? (at least field names)
0
select *
from employees
where
(
gender = 'male' and
year(bornDate) between 1962 and 1970 and
year(hireDate) > 2001
)
or
(
gender = 'female' and
year(bornDate) between 1972 and 1975 and
year(hireDate) in (2001, 2002)
)