Write a sql statement to display category id


Problem

I. Write a SQL query to display the employee ID and hire date of all sales persons (employees who have sold products and generate orders) who were hired after the employee with ID 57 got hired but before December 2016. Sort the result by the hire date and then employee ID.

The query returns rows.
See the output columns:
EMPLOYEE_ID HIRE_DATE
-------------------- ----------------

II. Write a query to display customer ID, customer name, order date, and number of orders on that date for customers who have placed orders on the same days as customer with ID 2.

Sort the result first by order date and then customer ID.

See the output columns:

Customer ID Name Order Date Number of Orders
---------------------- --------------------------------------- -------------------- ------------------------

III. Write a SQL statement to display category ID and category name for products that are more expensive than the most expensive product in category 2. Do not display duplicate values.

CATEGORY_ID CATEGORY_NAME
----------- --------------------------------------

IV. Write a SQL query to display the product ID, product name, category name, and unit price of the highest and lowest paid product(s). Sort the result by category ID and the product ID.

highest paid: the highest unit price
lowest paid: the lowest unit price

Product ID Product Name Category Name Unit Price
-------------- ------------------- --------------------- ------------

V. Write a query, display the customer ID, customer name, and order date for the customer who has placed the first order. Also, include the customer who has placed the last order in your result.

Sort the result by customer ID and order date.
CUSTOMER ID NAME ORDER DATE
---------------------- ---------------------- -------------------

Request for Solution File

Ask an Expert for Answer!!
PL-SQL Programming: Write a sql statement to display category id
Reference No:- TGS03242730

Expected delivery within 24 Hours