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

StfiD StfFName StfLName Salary 1011 1012 1013 Linda Greenberg 63000 1014 1015 Le

ID: 3602689 • Letter: S

Question

StfiD StfFName StfLName Salary 1011 1012 1013 Linda Greenberg 63000 1014 1015 Lee Eric Ann Smith Jordan 65000 70000 Jose Hernandez 56000 Jones 77000 18. Use the Staff table, as shown below, to answer question 18 to 20. 18. Which statement regarding the SQ query below is correct? (Reminder: The table name is staff) select Stff Name,Salary, (o.os Salary) as HolidayBonus from Staff where StfiD-1012; (Points : 1) O A) The report will have a column named StfD, and 1012 will be shown in that column. O B) The report will have a column named StfF Name, and Jordan will be shown in that column. O C) The report will have a column named HolidayBonus, and 3500 will be shown in that column. D) The report will have a column named Stuame, and Ann will be shown in that column.

Explanation / Answer

This is a simple one

1) FALSE

        Because in the select query there are only three columns are returned , ie

    StafFName, Salary, HolidayBonus

only these three columns are shown in the result , we use StfID in the where clause it only used to filter the result , this query selects the StfFName, Salary and HolidayBonus from the table Staff with stfID equals to 1012

and the actual out put is

StfFName       Salary   HolidayBonus

Ann                70000     3500

so there is no column with stfID , then it is false

B) FALSE

        Just look in to the result ie

StfFName       Salary   HolidayBonus

Ann                70000     3500

Here there is a column named StfFName but Jordan is not shown in that column because jordan is in the stfLName column in the staff table

So it is false

C) TRUE

        again look into the result

StfFName       Salary   HolidayBonus

Ann                70000     3500

In the query (0.05*Salary) as HolidayBonus this means or result that it will multiply the salray with 0.05 and output as HolidayBonus the (as) ie AS used in the query called alias ie we can give a name rather than the table

here salary is 70000

so 70000* 0.05 = 3500

then this is true

D) FALSE

      again as in the result

StfFName       Salary   HolidayBonus

Ann                70000     3500

there is no column called StfLName

so it is false

         

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