Question: write SQL queries satisfying the 4 questions using the given database. I have no idea what I'm doing PLEASE HELP Analysis Given the new make-up

 write SQL queries satisfying the 4 questions using the given database.

I have no idea what I'm doing PLEASE HELP Analysis Given the

new make-up of the organization Smart-Buy wants to understand some specifics of

the new employee base. Below are a few questions that will aid

in that endeavor. 1. Who were the top 50 retail employees that

worked for Smart-Buy? Report the city and state in which they worked,

their hourly rate, total number of hours worked, and marital status, in

descending order based upon the number of hours worked. 2. Several employees

write SQL queries satisfying the 4 questions using the given database. I have no idea what I'm doing PLEASE HELP

Analysis Given the new make-up of the organization Smart-Buy wants to understand some specifics of the new employee base. Below are a few questions that will aid in that endeavor. 1. Who were the top 50 retail employees that worked for Smart-Buy? Report the city and state in which they worked, their hourly rate, total number of hours worked, and marital status, in descending order based upon the number of hours worked. 2. Several employees believe that their paychecks were calculated incorrectly. Management has asked that you produce a report that shows all employees living in Oklahoma in the executive department that made more than $155,000 in the 3rd Quarter of 2018. Report the employee_id, last name, first name, department name, total gross salary. This report should be in alphabetical order from A-Z. 3. Smart-Buy wants to understand how many periods their seasonal workers worked during the busy season (4th quarter). 4. If smart-buy wants to relocate headquarters, where should they do this? HINT: It is easier to use at least 2 queries to answer this question. Take into consideration where the employees associated with headquarters (for example: accountants, IT workers, executives, and possibly others) currently live. Also consider the location of our most lucrative stores. Figure out how to provide a heatmap (use excel) of the location of the most lucrative stores, however you can be creative and use other tools if you like. Clipboard Find Text Formatting Obje... O w zip A fo try res Sort & Filter Records E addresses X address_id - street_addre- city state 300123 427 James Rapi Oklahoma City OK 300223 4733 Kayla Stat Memphis KS 300303 4656 Robert By Murfreesboro TN 300441 94868 Kim Vall Pompano Beac FL 300592 3389 Martinez | Orlando FL 300662 3835 Trevino Ri Edmond OK 300927 938 Travis Lock Tulsa OK 301031 918 Robert Plaz Palm Harbor TN 301069 34485 Patrick Grapevine TX 301154 60696 Ryan Par El Paso TX 301209 45190 Small Co Corpus Christi TX 301287 7203 Allen Wal Corpus Christi TX 301436 578 Sean Skyw: Dallas TX 301489 15436 Thomas Jones OK 301601 60696 Ryan Par El Paso TX 301615 974 Joseph Rid Wichita AR 301799 928 Poole Burg Evansville AR 301809 47752 Smith Kn Orlando FL 301883 4216 Evans Key Dallas TX phone_num - Click to Add 73072 214-662-6112 38188 901-440-7778 37127 615-111-7769 33064 561-855-1893 32854 407-345-9001 73013 405-346-1054 74121 918-873-3844 34684 727-839-1297 76051 682-185-9207 79980 915-404-7323 78402 361-879-8126 78416 361-725-2802 75219 972-974-4841 73049 405-558-9060 79938 915-371-0310 67260 316-294-0296 72729 479-242-9741 32814 321-692-8556 75860 214-538-1046 Records Sort & Filter Find . 38 addresses X FE calendar X ID num_of_wo- year 88 A 88 92 period 1 2017-10-01 2 2017-10-15 3 2017-11-01 4 2017-11-15 5 2017-12-01 6 2017-12-15 7 2018-01-01 92 84 84 92 8 2018-01-15 92 80 80 88 - year_quarte - year_month - Click to Add 2017 2017-04 2017-10 2017 2017-04 2017-10 2017 2017-04 2017-11 2017 2017-04 2017-11 2017 2017-04 2017-12 2017 2017-04 2017-12 2018 2018-01 2018-01 2018 2018-01 2018-01 2018 2018-01 2018-02 2018 2018-01 2018-02 2018 2018-01 2018-03 2018 2018-01 2018-03 2018 2018-02 2018-04 2018 2018-02 2018-04 2018 2018-02 2018-05 2018 2018-02 2018-05 2018 2018-02 2018-06 2018 2018-02 2018-06 2018 2018-03 2018-07 2018 2018-03 2018-07 2018 2018-03 2018-08 2018 2018-03 2018-08 2018 2018-03 2018-09 2018 2018-03 2018-09 88 84 84 92 9 2018-02-01 10 2018-02-15 11 2018-03-01 12 2018-03-15 13 2018-04-01 14 2018-04-15 15 2018-05-01 16 2018-05-15 17 2018-06-01 18 2018-06-15 19 2018-07-01 20 2018-07-15 21 2018-08-01 22 2018-08-15 23 2018-09-01 24 2018-09-15 92 84 84 88 88 92 92 80 80 1 of 30 Search Record: R New A Ascending Y Selection Al Descending Advanced 2. Remove Sort Y Toggle Filter Save Filter Refresh All- X Delete ainter Sort & Filter Rece Go To Select- More B I U at A Sort & Filter calendar X addresses X ID C employee_i- 1000167 1000167 2 net pay 2073.18 2073.18 2235.55 2285.55 3 1000167 4 1000167 1000167 5 1910.81 736.94 6 1000182 7 8 1000182 1000182 1000182 620.26 539.48 296.84 9 10 Records Find Text Formatting departments X employee_info X Hae payroll_registry X period hours worki - gross_pay fed_income FICA_medic - FICA_social state_incom - misc_deduct- 10/1/2017 88 3868.48 1305.55 56.09 240.23 0 193.42 10/15/2017 88 3868.48 1305.55 56.09 240.23 O 193.42 11/1/2017 92 4044.32 1305.55 58.64 251.15 0 193.42 11/15/2017 92 4044.32 1305.55 58.64 251.15 o 193.42 12/1/2017 84 3692.64 1305.55 53.54 229.31 0 193.42 10/1/2017 91 884.52 35.6 12.83 54.93 O 44.23 10/15/2017 78 758.16 35.6 10.99 47.08 0 44.23 11/1/2017 69 670.68 35.6 9.72 41.65 0 44.23 11/15/2017 38 369.36 0 5.36 22.94 0 44.23 12/1/2017 63 612.36 35.6 8.88 38.03 0 44.23 10/1/2017 88 5010.72 1305.55 72.66 311.17 76.84 250.54 10/15/2017 88 5010.72 1305.55 72.66 311.17 76.84 250.54 11/1/2017 92 5238.48 1305.55 75.96 325.31 76.84 250.54 11/15/2017 92 5238.48 1305.55 75.96 325.31 76.84 250.54 12/1/2017 84 4782.96 1305.55 69.35 297.02 76.84 250.54 10/1/2017 88 2016.08 246.65 29.23 125.2 0 100.8 10/15/2017 88 2016.08 246.65 29.23 125.2 0 100.8 11/1/2017 92 2107.72 246.65 30.56 130.89 0 100.8 11/15/2017 92 2107.72 246.65 30.56 130.89 0 100.8 84 12/1/2017 1924.44 246.65 27.9 0 119.51 100.8 10/1/2017 88 4796.88 1305.55 69.55 297.89 76.84 239.84 10/15/2017 88 4796.88 1305.55 69.55 297.89 76.84 239.84 125 cc 7070 11 76 84 239.84 485.63 1000182 1000332 1000332 11 2993.98 12 2993.98 3204.29 13 1000332 14 1000332 3204.29 2783.66 15 16 1514.19 18 19 1000332 1000422 1000422 1000422 1000422 1000422 11000445 1000445 1514.19 1598.81 1598.81 1429.57 2807.21 2807.21 3008 55 20 21 22 Sort & Filter Records departments X 90 employee_info X store_id store reven - Click to Add 1000 435887.17 NP 1000 296327.95 1000 630305.28 1000 990760.44 1000 1000 684759.63 898176.12 964254.1 1000 1000 277307.82 1000 173901.5 1000 981765.66 218546.91 addresses X calendar X ID period 10/1/2017 10/15/2017 3 11/1/2017 4 11/15/2017 5 12/1/2017 6 12/15/2017 7 1/1/2018 8 1/15/2018 9 2/1/2018 10 2/15/2018 11 3/1/2018 12 3/15/2018 13 4/1/2018 14 4/15/2018 15 5/1/2018 16 5/15/2018 17 6/1/2018 18 6/15/2018 7/1/2018 7/15/2018 21 8/1/2018 22 B/15/2018 9/1/2018 24 9/15/2018 Record: 1 of 25080 1000 1000 1000 955087.28 409176.51 175907.08 731808.61 1000 1000 1000 1000 1000 1000 20 1000 688178.09 840887.39 871268.72 1009154.33 897191.12 920682.92 798782.84 6986718.02 261700.68 1000 1000 1000 1000 Search 479 Formatting addresses calendar X departments X 520 employee_info X 2 payroll_registry Xd revenue stores x B stores X store id - street addre- city state zip area codes - estimated populatior - operating hours Click to Add 1000 009 Robinson Fort Smith AR 72903 479 19254 24 1001 4623 Taylor Isla Pea Ridge AR 72751 5039 24 1002 7120 Travis Gar Elkins AR 72727 479 4305 24 1003 6275 Davis Ligh Garfield AR 72732 479 3331 24 1004 938 Jennifer M Hartford AR 72938 479 989 24 1005 0401 Atkins For Hartford AR 72938 479 989 24 1006 8623 Debra Sta Barling AR 72923 479 3533 24 1007 90885 Joel Plain Summers AR 72769 479 707 24 1008 747 Wyatt Mills Fayetteville AR 72703 479 20028 24 1009 482 John Moun Fort Smith AR 72913 479 447 24 1010 4803 Lisa Estate Fort Smith AR 72916 479 5859 24 1011 5154 Amy Valle Fayetteville AR 72704 479 14751 24 1012 241 Thomas Sq Summers AR 72769 479 707 24 1013 58076 Michelle Fort Smith AR 72904 479 14618 24 1014 877 William Tre Fayetteville AR 72703 479 24 20028 AR 72751 1015 97240 Carr Islar Pea Ridge 479 5039 24 AR 72734 479 5426 24 1016 82471 Jerry Esti Gentry 72761 479 15283 24 1017 0539 Alan Vista Siloam Springs AR 72756 479 AR 28684 24 1018 7872 Taylor Vill Rogers 72718 479 AR 1244 24 1019 850 Michael Co Cave Springs 72702 479 1544 24 AR 1020 05646 Joseph V Fayetteville 479 72936 11509 24 AR 1021 5088 Christine Greenwood 172768 24 479 752 1022 5951 Colleen K Sulphur Spring AR 407 32860 767 24 FL 1023 7959 Edwin Por Orlando 1 of 836 Record 1 Search

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!