Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Now create and run a SQL query that displays only Employee Name (First name, Middle Initial, and Last name) and JOB_DESCRIPTION sorted by Employee last

image text in transcribed

Now create and run a SQL query that displays only Employee Name (First name, Middle Initial, and Last name) and JOB_DESCRIPTION sorted by Employee last name. See the picture below for the expected result. Note to accomplish this you must use CONCAT() function AND alias to get employee name grouped into one Attribute named EMP_NAME along with sorting the data prior to display. See lecture slide 71 for CONCAT and Alias and lecture slides 89 & 90 for sorting a list. Additionally, you will need to join EMP_1 with JOB by JOB_CODE but only select JOB_DESCRIPTION to be displayed BESIDES the employees name. See lecture slides 100-104 and the textbook for details. For this problem, you need to provide your MySQL code as plain text inserted into the homework and the resulting table pasted into your homework document as an image.

image text in transcribed

MariaDB [jcherian3879] SELECT FROM EMP 1 EMP NUM I EMP LNAME I EMP FNAME I EMP INTIAL I EMP HIRE DATE I JOB CODE I 101 John I 2000-11-08 502 News I Senior I David 102 1989-07-12 501 I 1996-12-01 I 500 103 I Arbough June 1987-11-15 501 104 I Ramoras Anne Alice 105 I Johnson 1993-02-01 502 I Smithfield I William I 106 2004-06-22 500 107 I Alonzo 1993-10-10 500 Maria I Washington I Ralph 108 I 1991-08-22 501 I Smith 109 I 1997-01-18 501 Larry 9 rows in set (0.00 sec) MariaDB ijcherian3879] SELECT FROM JOB; I JOB CODE I JOB DESCRIPTION JOB CHG HOUR I JOB LAST UPDATE I 500 Programmer 35.75 I 2013-11-20 501 Systems Analyst 96.75 I 2013-11-20 I Database Designer 502 125.00 2014-03-24 I Electrical Engineer I 503 84.50 2013-11-20 I Mechanical Engineer I 504 67.90 I 2013-11-20 I Civil Engineer 505 55.78 2013-11-20 I Clerical Support 506 26.87 2013-11-20 DSS Analyst 507 45.95 I 2013-11-20 Applications Designer l 508 48.10 2014-03-24 Bio Technician 509 34.55 I 2013-11-20 18.36 I 2013-11-20 510 I General Support 11 rows in set (0.01 sec)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Define procedural justice. How does that relate to unions?

Answered: 1 week ago

Question

=+6. What does the invisible hand of the marketplace do?

Answered: 1 week ago

Question

=+ 4. Why should policymakers think about incentives?

Answered: 1 week ago