Question: Use HR database (Sample tables and data are in DatabaseHR.pdf file below). Create a query to show all the names of regions, names of countries

 Use HR database (Sample tables and data are in DatabaseHR.pdf file below). Create a query to show all the names of regions, names of countries and number of locations in them (including regions/countries with 0 locations). Sort by number of locations starting from the highest number.

 

2. Use HR database (Sample tables and data are in DatabaseHR.pdf file). Create a query to show all the employees who have salary between 1000 and 2000. Display: last name, first name, employee_id, department name, job title, salary. Sort the output by last name and first name.

Database: HR, Tables: Regions Region ID Region Name 1 Europe Americas Countries AR AU BE US Country_ID CA CH Departments DEPARTMENT_ID DEPARTMENT_NAME MANAGER_ID LOCATION_ID 10 Administration 20 Marketing 30 Purchasing Employees SALARY COMMISSION_PCT MANAGER_ID DEPARTMENT_ID 24000.00 0.00 17000.00 0.00 King Kochhar De Haan 

Database: HR, Tables: Regions Region ID Region Name 1 Europe Americas Countries AR AU BE US Country_ID CA CH CN DE DK 2 EG FR IL 3 4 Asia Middle East and Africa Country Name Region ID Argentina 2 Australia Belgium USA Canada Switzerland China Germany Denmark Egypt France Israel 3 1 2 2 1 3 1 1 4 1 4 Location_id Street Address 1297 Via Cola di Rie 93091 Calle della Testa 2017 Shinjuku-ku 9450 Kamiya-cho 2014 Jabberwocky Rd 2011 Interiors Blvd 2007 Zagora St 2004 Charade Rd Locations 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 1298 Vileparle (E) 2200 12-98 Victoria Street 2300 198 Clementi North 2400 8204 Arthur St 2500 Magdalen Centre, The Oxford Science Park 2600 9702 Chester Road 2700 Schwanthalerstr. 7031 2800 Rua Frei Caneca 1360 2900 20 Rue des Corps-Saints 3000 Murtenstrasse 921 3100 Pieter Breughelstraat 837 3200 Mariano Escobedo 9991 147 Spadina Ave 6092 Boxwood St 40-5-12 Laogianggen Postal Code 989 10934 1689 6823 26192 99236 50090 98199 M5V 2L7 YSW 9T2 190518 Beijing 490231 Bombay 2901 Sydney 540198 Singapore London Oxford Stretford Munich Sao Paulo Geneva OX9 9ZB 9629850293 80925 01307-002 1730 3095 3029SK City Roma Venice Tokyo Hiroshima Southlake South San Francisco South Brunswick Seattle Toronto Whitehorse 11932 Bern Utrecht Mexico City State Province Tokyo Prefecture Texas California New Jersey Washington Ontario Yukon Maharashtra New South Wales Oxford Manchester Bavaria Sao Paulo Geneve BE Utrecht Distrito Federal, Country_ID IT IT JP JP US US US US CA CA CN IN AU SG UK UK UK DE BR CH CH NL MX

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To answer the questions well need to craft SQL queries using the structure and relationships between ... View full answer

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!