Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL CODE: https://gist.githubusercontent.com/GistMasterPro/3893fe6d62ae301e85265a7f0ceafad4/raw/40fe8193dd74c39a56724d8eda2d445e41bc58c7/SQL.sql OR https://gist.github.com/GistMasterPro/3893fe6d62ae301e85265a7f0ceafad4 30. Write a query to display the first name, last name, phone number, title, and department number of employees who

image text in transcribed

image text in transcribed

image text in transcribed

SQL CODE:

https://gist.githubusercontent.com/GistMasterPro/3893fe6d62ae301e85265a7f0ceafad4/raw/40fe8193dd74c39a56724d8eda2d445e41bc58c7/SQL.sql

OR

https://gist.github.com/GistMasterPro/3893fe6d62ae301e85265a7f0ceafad4

30. Write a query to display the first name, last name, phone number, title, and department number of employees who work in department 300 or have the title "CLERK I." Sort the output by last name and then by first name. 31. Write a query to display the employee number, last name, first name, salary beginning date, salary end date, and salary amount for employees 83731, 83745, and 84039. Sort the output by employee number and salary "from" date. 33. Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title ends in the word "ASSOCIATE." Sort the output by department name and employee title. 46. Write a query to display the brand ID, brand name, brand type, and average price of products for the brand that has the largest average product price. 48. Write a query to display the current salary for each employee in department 300 . Assume that only current employees are kept in the system, and therefore the most current salary for each employee is the entry in the salary history with a NULL end date. Sort the output in descending order by salary amount. 49. Write a query to display the starting salary for each employee. The starting salary would be the entry in the salary history with the oldest salary start date for each employee. Sort the output by employee number. 50. Write a query to display the invoice number, line numbers, product SKUs, product descriptions, and brand ID for sales of sealer and topcoat products of the same brand on the same invoice. Sort the results by invoice number in ascending order, first line number in ascending order, and then by second line number in descending order. 52. Write a query to display the customer code, first name, and last name of all customers who have had at least one invoice completed by employee 83649 and at least one invoice completed by employee 83677 . Sort the output by customer last name and then first name. 53. LargeCo is planning a new promotion in Alabama (AL) and wants to know about the largest purchases made by customers in that state. Write a query to display the customer code, customer first name, last name, full address, invoice date, and invoice total of the largest purchase made by each customer in Alabama. Be certain to include any customers in Alabama who have never made a purchase; their invoice dates should be NULL and the invoice totals should display as 0 . Sort the results by customer last name and then first name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Q: What steps are taken to reduce turnover?

Answered: 1 week ago

Question

2. How can competencies be used in employee development?

Answered: 1 week ago