Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a query to list the region_id and the first three letters of all countries within region 2. Show the output in alphabetical order
Write a query to list the region_id and the first three letters of all countries within region 2. Show the output in alphabetical order and display the results in the format shown below. country_code region_id CAN UNI 2 2 Write a query to list all departments and the names of their managers. Display the data in the format shown below. For departments that have no manager show 'No Manager!. Sort the output in order of the manager's salary (highest to lowest). department_id department_name Manager 90 20 110 80 60 50 10 190 Executive Marketing Accounting Sales IT Shipping Administration Contracting KING, Steven HARTSTEIN, Michael HIGGINS, Shelley ZLOTKEY, Eleni HUNOLD, Alexander MOURGOS, Kevin WHALEN, Jennifer No Manager Write a query which displays the full name and department id of employees who work in the same department as anyone whose last name starts with 'M' Do not display anyone whose last name starts with 'M' Employee Trenna Rajs Curtis Davies Peter Vargas department_id 50 50 50 Write a query to find the total salaries of all the employees in each department. Employees that are not in a department should appear as being in the department "None" Order the results alphabetically by department name Do not display any departments that have a total salary of 30000 or greater department_id department_name total_salary 70 10 40 20 None 50 30 (7 rows affected) Accounting Administration IT Marketing None Sales Shipping $20000.00 $4400.00 200.00 $16500.00 $7000.00 $29500.00 $17700.00
Step by Step Solution
★★★★★
3.41 Rating (164 Votes )
There are 3 Steps involved in it
Step: 1
1 2 ANSWER 3 4 5 6 7 List the regionid and the first three letters of all countries within region 2 ...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