2. Write a query to display employee dependents who are children(not including wife or husband). The result should display fourcolumns as follows: Employee SSN (in the format of 999-99-9999) asEmployee SSN, dependent name as Dependent Name, birthdate of thedependent (in the date format shown as in example Jan. 01, 2010)named as Birth Date, and relationship of the dependent named asRelationship. Sort the results by the employee SSN in ascendingorder and the birth date in descending order within the employee.See sample output below. Please use SUBSTRING and DATE_FORTMAT
\begin{tabular}{l|l|l} \hline Department & Manager & Employee Supervised \\ \hline 1 Headquarters & Bijoy Bordoloi & Waiman Zhu \\ 1 Headquarters & Bjjoy Bordoloi & Suzanne Joyner \\ 3 Admin and Records & Suzanne Joyner & Hyder Amin \\ 3 Admin and Records & Suzanne Joyner & Marcia Markis \\ 7 Production & Waiman Zhu & Douglas Bock \\ 7 Production & Waiman Zhu & Dinesh Joshi \\ 7 Production & Waiman Zhu & Sherri Prescott \end{tabular}
\begin{tabular}{llll} Employee & Department & Eirth Date & Relabonahip \\ \hline MSN & Name & & \\ \hline 999−11−1111 & Mchele & March 17, 1934 & DALGHTER \\ 999−11−1111 & Deanna & May 03, 1981 & DAUGHIER \\ 999−11−1111 & Jeffery & December 31, 1978 & SON \\ 999−11−1111 & Rachael & October 04, 1975 & DAUGHTER \\ 999−44−4444 & Andrew & October 25, 1993 & SON \\ 999−44−4444 & JoElen & Apri 05, 1996 & DAUGHTER \\ 999−66−6666 & Rita & May 11, 1994 & DAUGHTER \\ 999−66−6666 & Morica & December 30, 1933 & DAUGHTER \\ 999−66−6666 & Arita & Jul 06, 1934 & DAUGHTER \end{tabular}
\begin{tabular}{l|l|l} \hline Department & Manager & Employee Supervised \\ \hline 1 Headquarters & Bijoy Bordoloi & Wai
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
\begin{tabular}{l|l|l} \hline Department & Manager & Employee Supervised \\ \hline 1 Headquarters & Bijoy Bordoloi & Wai
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!