Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a query to display the starting salary for each employee. The starting sal

ID: 3774982 • Letter: W

Question

Write a query to display the starting salary for each employee. The starting salary would be the entry in the salary history with the oldest salary start date for each employee.

Ch08 LargeCo: D H:I TABLE TOOLS FILE HOME CREATE EXTERNAL DATA DATABASE TOOLS FIELDS TABL JAS Tot Select ding Rep Sa Copy Ad AN Descending Sp Go To Past Refresh Find EE M se Sort Y Toggle Fi X Delet Clipb Sort & Fit Find Update Office GET THE NEW OFFICE he perks of h g Offi 65 See what's new LGEMPLOYEE LGSALARY HISTORY LGDEPARTMENT Query1 LG PRODUCT All Access Obje EMP NUM SAL FROM SAL END SAL AMOUNT Tab 9/30/1992 9/30/1993 21250 EEE LG BRAND 3/4/2012 3/4/2013 84259 44560 EEE LG CUSTOMER 84259 3/4/2011 3/3/2012 42440 BEE LGDEPARTMENT 84259 3/5/2010 3/4/2011 40420 84259 3/6/2009 3/4/2010 39240 BEE LGEMPLOYEE 84259 3/5/2008 3/5/2009 38100 EE LGINvoICE 5/14/2012 5/14/2013 41670 84254 EEE LGLINE 84254 5/14/2011 5/13/2012 39690 EE LG PRODUCT 84254 5/15/2010 5/14/2011 37800 EE LGSALARY HISTORY 84254 5/16/2009 5/14/2010 34360 84254 5/15/2008 5/15/2009 33360 EEE LGSUPPLIES 84254 5/15/2007 5/14/2008 31770 EEE LGVENDOR 84254 5/16/2006 5/15/2007 30260 84254 5/17/2005 5/15/2006 29380 84254 5/16/2004 5/16/2005 26710 84254 5/16/2003 5/15/2004 24280 84254 5/17/2002 5/16/2003 23120 84254 5/18/2001 5/16/2002 22450 21800 5/17/2000 5/17/2001 84254 84254 5/17/1999 5/16/2000 20190 84254 5/18/1998 5/17/1999 19600 84254 5/19/1997 5/17/1998 18670 84254 5/18/1996 5/18/1997 17780 84254 5/18/1995 5/17/1996 17260 84254 5/19/1994 5/18/1995 16760 84254 5/20/1993 5/18/1994 16270 84254 5/19/1992 5/19/1993 15800 84254 5/19/1991 5/18/1992 15340 84254 5/20/1990 5/19/1991 14890 14460 84254 5/21/1989 5/19/1990 Datasheet View Ask me anything base Lab_5 Ch08. LargeC db (A Calib Text Formatting 2002-2003 fi Sabrina Jordan NUM LOCK 35 PM D. 4) /19/2016

Explanation / Answer

=================================================================
--------------
Answer:
--------------

   SELECT
       emp.EMP_NUM,
       emp.EMP_LNAME,
       emp.EMP_FNAME,
       sal.SAL_AMOUNT
   FROM
       LGEMPLOYEE emp
           JOIN
       LGSALARY_HISTORY sal
           ON
       emp.EMP_NUM = sal.EMP_NUM

   WHERE
       sal.SAL_FROM =
       (SELECT min(sal2.SAL_FROM) FROM LGSALARY_HISTORY sal2 WHERE emp.EMP_NUM = sal2.EMP_NUM);
      
---------------------
Explanation:
---------------------

   First make a join on the LGEMPLOYEE and LGSALARY_HISTORY table on EMP_NUM, Apply where condition such that
min of SAL_FROM from LGSALARY_HISTORY should be taken out from inner query and applied the date on outer query.
Results the starting salary for each employee.

=================================================================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote