- 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.

22nd Sep 2019, 11:54 AM
ghazaleh
2 odpowiedzi
+ 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)
22nd Sep 2019, 12:07 PM
Ipang
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) )
22nd Sep 2019, 9:33 PM
Ivan