Write a query to display all vendors sorted by vendor name.   Write a query to display the product id, description, type, base, category, and price for all products that have a product base of water and a product category of sealer. Write a query to display the first name, last name, and email address of employees who were not hired from January 1, 2015, to December 31, 2019. Sort the output by the last name and then by the first name.  Write a query to display the first name, last name, phone number, title, and department number of employees who work in department 123 and have the title “Assistant.”  Write a query to display the employee number, last name, first name, salary “from” date, salary end date, and salary amount for employees 99675, 53845, and 44035. Sort the output by employee number and salary “from” date. Write a query to display the first name, last name, street no, street name, city, state, and zip code of any customer who purchased a Forest brand between July 15, 2015, and Jul 20, 2015. If a customer purchased more than one such product, display the customer’s information only once in the output.  Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title does not end in the word ”Assistant". Write a query to display a brand name and the number of products of that brand that are in the database. Sort the output by the brand name. Write a query to display the number of products in each category that have a water base, sorted by category. Write a query to display the total inventory, i.e. the sum of all products on hand for each brand id. Sort the output by brand id in ascending order.

Database Systems: Design, Implementation, & Management
12th Edition
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Carlos Coronel, Steven Morris
Chapter8: Advanced Sql
Section: Chapter Questions
Problem 52P
icon
Related questions
Question

Based on stage 2, write queries for the following questions:

 

    1. Write a query to display all vendors sorted by vendor name.

 

    1. Write a query to display the product id, description, type, base, category, and price for all products that have a product base of water and a product category of sealer.
    1. Write a query to display the first name, last name, and email address of employees who were not hired from January 1, 2015, to December 31, 2019. Sort the output by the last name and then by the first name. 
    1. Write a query to display the first name, last name, phone number, title, and department number of employees who work in department 123 and have the title “Assistant.” 
    1. Write a query to display the employee number, last name, first name, salary “from” date, salary end date, and salary amount for employees 99675, 53845, and 44035. Sort the output by employee number and salary “from” date.
    1. Write a query to display the first name, last name, street no, street name, city, state, and zip code of any customer who purchased a Forest brand between July 15, 2015, and Jul 20, 2015. If a customer purchased more than one such product, display the customer’s information only once in the output. 
    1. Write a query to display the employee number, last name, email address, title, and department name of each employee whose job title does not end in the word ”Assistant".
    1. Write a query to display a brand name and the number of products of that brand that are in the database. Sort the output by the brand name.
    1. Write a query to display the number of products in each category that have a water base, sorted by category.
    1. Write a query to display the total inventory, i.e. the sum of all products on hand for each brand id. Sort the output by brand id in ascending order.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 5 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

can you slove more 3 queries

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning