write queries that answer the below questions1. Display details of all the customers from customer table. 2.
Question:
write queries that answer the below questions1. Display details of all the customers from customer table.
2. Display all the product names in product table. Remember to display only the name.
3. Select employee names who lives in city Chehalis.
4. Select everything from customer table ordered (ascending) by customer id.
5. Provide specific details about employee(s) whose last name is "Tate" (address, city, state, postal code) and include the skill description(s) of the skill(s) possessed.
6. Retrieve all the skill information if the low pay hour for the skill is greater than 10 and high pay hour for the skill is less than 30.
7. Retrieve the unit price for each material description where the grade is "A" level (grade starts with "A"). Display only the material description, grade, and unit price.
8. Retrieve the average unit price for each material description where the grade is "A" level and the footage on hand is in between 10 and 300. Display only the material description and average unit price.
9. Get a distinct list of product name, and rename it as "distinct_product". Only display the names.
10. Display the count of customers who lives in each state. Display the count of customers and the state. Rename the column for count as 'customer_count' and 'State' as 'state'.
11. List the maximum and minimum unit price for each product. Display the product name, and rename the columns as "maximum" and "minimum" respectively.
12. Get the total value on hand for each product name. (Total value on hand is unit price times the unit on hand)
13. List the distinct product names whose average unit price is higher than $300.
14. Select the top 3 highest material description based on their average unit price.
15. List all of the vendor names and the raw materials (material id, material description, thickness, size, and grade) that they supply (by material id, in ascending order, within vendor name, in descending order).
16. List all the salespersons (salesperson name), the sales territories (territory description) that they cover, the customers that they service (customer name), and the product ordered (product name) by each customer. This report should be ordered by product name (ascending), within customer name (ascending), within territory description (ascending), within salesperson name (ascending).
17. List all of the product names, customers (customer name), the sales territory(ies) (territory description) to which the customer belongs, and the associated salesperson(s) (salesperson name). This report should be ordered by salesperson name (ascending), within territory description (ascending), within customer name (ascending), within product name (ascending).
18. List the total of footage on hand for all raw materials (only list the total footage; no details).
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill