1 Show a report of all the employees which displays information in the following
ID: 3546727 • Letter: 1
Question
1 Show a report of all the employees which displays information in the following format below. Please note that the title label on the output. The statements outputted should be sorted by the job as a sample report below (Obviously the data will be different since you are using the employees table which has different data):
STATEMENTS
--------------------------------------------------------------------
FORD Is hired on 03-DEC-1981 and he works as a ANALYST
SCOTT Is hired on 09-DEC-1982 and he works as a ANALYST
JAMES Is hired on 03-DEC-1981 and he works as a CLERK
SMITH Is hired on 17-DEC-1980 and he works as a CLERK
MILLER Is hired on 23-JAN-1982 and he works as a CLERK
ADAMS Is hired on 12-JAN-1983 and he works as a CLERK
BLAKE Is hired on 01-MAY-1981 and he works as a MANAGER
CLARK Is hired on 09-JUN-1981 and he works as a MANAGER
JONES Is hired on 02-APR-1981 and he works as a MANAGER
Explanation / Answer
Assumptions:
Table name is EMPLOYEE
First name attribute is fname.
Hire data attribute is hdate.
Designation attribute is desig.
select concat(fname, " is hired on" , day(hdate),"-",monthname(hdate),"-",year(hdate),"and he works as a ",desig) AS "STATEMENTS" FROM EMPLOYEE
ORDER BY desig
Hope it helps :)
PS: This is my first answer on Chegg!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.