Answered step by step
Verified Expert Solution
Question
1 Approved Answer
New Database Open Database Write Changes Revert Changes New Database Open Database Write Changes Revert Changes Database Structure Browse Data Edit Pragmas Execute SQL Database
New Database Open Database Write Changes Revert Changes New Database Open Database Write Changes Revert Changes Database Structure Browse Data Edit Pragmas Execute SQL Database Structure Browse Data Edit Pragmas Execute SQL Table: country Table: department CountryId CountryName RegionId DepartmentId DepartmentName LocationId Manager Filter Filter Filter Filter Filter Filter Filter 1 AR Argentina 2 1 Administration 1700 102 2 AU Australia 3 2 Marketing 1800 201 N 3 BE Belgium 1 3 3 Purchasing 1700 114 4 BR Brazil 2 4 Human Resources 2400 203 5 CA Canada 2 5 Shipping 1500 122 6 CH Switzerland 6 IT 1400 106 7 CN China 3 7 Public Relations 2700 204 8 DE Germany 8 Sales 2500 146 9 DK Denmark 9 Executive 1700 101 10 EG Egypt 4 10 10 Finance 1700 108 11 FR France 1 11 11 Accounting 1700 205 12 HK HongKong 3 12 12 IT 2400 106 13 IL Israel 4 13 13 IT 1500 106 14 IN India 3File Edit View Tools Help File Edit View Tools Help New Database Open Database Write Changes Revert Changes Open Proj New Database Open Database Write Changes Revert Changes Open Project Database Structure Browse Data Edit Pragmas Execute SQL Database Structure Browse Data Edit Pragmas Execute SQL Table: dependent bg Filter Table: job big Filter in any DependentID FirstName LastName Relationship EmployeeId JobID JobTitle MinSalary MaxSalary PayLevel Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter 1 Penelope Gietz Child 206 1 Public Accountant 4200.0 9000.0 3 N 2 Nick Higgins Child 205 2 2 Accounting Manager 8200.0 16000.0 7 W 3 Ed Whalen Child 200 3 3000.0 6000.0 2 A 4 Jennifer King Child 100 3 Administration Assistant Kochhar 101 4 4 President 20000.0 40000.0 19 5 Johnny Child 14 6 Bette De Haan Child 102 5 5 Administration Vice President 15000.0 30000.0 7 Grace Faviet Child 109 6 Accountant 4200.0 9000.0 3 8 Matthew Chen Child 110 7 7 Finance Manager 8200.0 16000.0 7 Co 9 Joe Sciarra Child 111 CO 8 Human Resources Representative 4000.0 9000.0 10 10 Christian Urman Child 112 9 9 Programmer 4000.0 10000.0 W 11 11 Zero Popp Child 113 10 10 Marketing Manager 9000.0 15000.0 CO 12 12 Karl Greenberg Child 108 11 11 Marketing Representative 4000.0 9000.0 13 13 Uma Mavris Child 203 12 12 Public Relations Representative 4500.0 10500.0 W 14 14 Vivien Hunold Child 103 13 13 Purchasing Clerk 2500.0 5500.0 1 15 15 Cuba Ernst Child 104File Edit View Tools Help Co New Database Open Database Write Changes Revert Changes Open Project Save Project Attach Database X Close Database Database Structure Browse Data Edit Pragmas Execute SQL Table: employee ba Filter in any column EmployeeID FirstName LastName email PhoneNumber HireDate TermDate JobID Salary DepartmentID +1 Filter Filter Filter Filter Filter Filter Filter Filter Filter Filter 200 Jennifer Whalen jennifer.whalen@sqltutorial.org 515.123.4444 2007-09-17 2010-08-05 3 4400.0 H 201 Michael Hartstein michael.hartstein@sqltutorial.org 515.123.5555 2016-02-17 NULL 10 13000.0 N 202 Pat Fay pat.fay@sqltutorial.org 603.123.6666 2022-08-17 NULL 11 6000.0 2 4 114 Den Raphaely den.raphaely@sqltutorial.org 515.127.4561 2014-12-07 NULL 14 11000.0 3 5 115 Alexander Khoo alexander.khoo@sqltutorial.org 515.127.4562 2015-05-18 2006-06-04 13 3100.0 3 6 116 Shelli Baida shelli.baida@sqltutorial.org 515.127.4563 1997-12-24 NULL 13 2900.0 W 7 117 Sigal Tobias sigal.tobias@sqltutorial.org 515.127.4564 1997-07-24 NULL 13 2800.0 W 8 118 Guy Himuro guy.himuro@sqltutorial.org 515.127.4565 1998-11-15 NULL 13 2600.0 W 9 119 Karen Colmenares karen.colmenares@sqltutorial.org 515.127.4566 2015-08-10 NULL 2500.0 W 10 203 Susan Mavris susan.mavris@sqltutorial.org 515.123.7777 2014-06-07 NULL 8 6500.0 A 120 Matthew Weiss matthew.weiss@sqltutorial.org 650.123.1234 1996-07-18 2015-12-12 19 8000.0 un 11 12 121 Adam Fripp adam.fripp@sqltutorial.org 650.123.2234 1997-04-10 NULL 19 8200.0 Un 13 122 Payam Kaufling payam.kaufling@sqltutorial.org 650.123.3234 2015-05-01 NULL 19 7900.0 Un 14 123 Shanta Vollman shanta.vollman@sqltutorial.org 650.123.4234 1997-10-10 NULL 19 6500.0 15 126 Irene Mikkilineni irene.mikkilineni@sqltutorial.org 650.124.1224 1998-09-28 NULL 18 2700.0 un 1 - 1 5 -- A FAI F ARFile Edit View Tools Help File Edit View Tools Help New Database Open Database Write Changes Revert Changes Open Project Save Project Attach Di New Database Open Database Database Structure Browse Data Edit Pragmas Execute SQL Database Structure Browse Data Edit Pragma Table: location Filter in any column LocationID StreetAddress PostalCode city StateProvince CountryID Table: region Filter Filter Filter Filter Filter Filter RegionID RegionName 1400 2014 Jabberwocky Rd 26192 Southlake Texas US Filter Filter 2 1500 2011 Interiors Blvd 99236 South San Francisco California US 3 1700 2004 Charade Rd 98199 Washington US 1 1 Europe Seattle 4 1800 147 Spadina Ave M5V 2L7 Toronto Ontario CA 2 2 Americas 5 2400 8204 Arthur St NULL London NULL UK 3 3 Asia 6 2500 Magdalen Centre, The Oxford Science Park OX9 9ZB Oxford Oxford UK 4 4 Middle East and Africa 7 2700 Schwanthalerstr. 7031 80925 Munich Bavaria DE. You are a member of the committee that is planning a holiday party close to New Years. Normally everyone from the company and their families attend. In order to create name tags for everyone and create a seating chart, print out a list of all the employees and their dependents. Be sure to include the relationship of each dependent. Put the list in alphabetical order by last name. . You are a member of the committee that is planning to award \"25 Years of Service Pins\" to some of your longest serving employees, those hired anytime in 1997 and that live in the United States. The Pins will be engraved with the person's first and last name, along with the name of the department where they are currently working. The Pins will be wrapped and mailed to the employee's ofce location, so you will need the street address, city, postal code and country. The list should ordered by country and then the employee's last name (Hint: Order by). . Your manager feels that employees that live in countries that start with the last few letters of the alphabet are always left out. So, to increase communication with employees that live in countries beginning with the letters U, V, W, X, Y, & Z, your manager has asked for the employees rst and last name, department, email, phone number, and the unabbreviated country name they live in. The list should be sorted by country name, in reverse order (start with Z) and the department name in alphabetical order. (Hint: Order by, Broadening and limiting responses) Sales have been particularly good this year, so your company would like to reward the employees that work and have a job title beginning with sales and marketing (Hint: Broadening and limiting responses). To know where sales have been good, the managers would also like to know the country name and the region name of the employees. The report should be sorted by job title, beginning with those working in marketing. . Management is considering a move into new ofce space. To understand how much space each department needs, you would like to run a query that counts the number of employees in each department. Print out a simple report that has the name of the departments grouped and the number of employees in each. (Hint: Math in SQL, Grouping results) . To have a better understanding of gl_1_9_f_ the salary ranges for each employee, your manager has asked you to calculate the difference between the minimum salary range of a job and each employees current salary
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started