!Page!5!of!21!
4. Write! a! query! to! display! the! first! name,! last! name,! phone! number,! title,! and! department! number! of!
employees!who!work!in!department!300!or!have!the!title!“CLERK!I.”!Sort!the!output!by!last!name!and!then!
by!first!name.!
!
use!largeco;!
Select!emp_fname,!emp_lname,!emp_phone,!emp_title,!dept_num!
from!lgemployee!
where!dept_num!=!300!or!emp_title!=!’CLERK!I‘!
order!by!emp_lname,!emp_fname;!
!
!
5. Write!a!query!to!display!the!employee!number,!last!name,!first!name,!salary!“from”!date,!salary!end!date,!
and!salary!amount!for!employees!83731,!83745,!and!84039.!Sort!the!output!by!employee!number!and!salary!
“from”!date.!
!
use!largeco;!
select!e.emp_num,!e.emp_lname,!e.emp_fname,!s.sal_from,!s.sal_end,!s.sal_amount!
from!lgemployee!e,!lgsalary_history!s!
where!s.emp_num!=!e.emp_num!and!
!(e.emp_num!=!83731!or!e.emp_num!=!83745!or!e.emp_num!=!84039);!
!