0% found this document useful (0 votes)
6 views3 pages

Essential Database Lab Queries Guide

The document contains a list of 60 database lab questions focused on retrieving various data from a database. The questions cover a range of topics including product pricing, customer information, employee details, order statistics, and supplier data. Each question specifies a particular query to extract specific information from the database.

Uploaded by

madrock.7201
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

Essential Database Lab Queries Guide

The document contains a list of 60 database lab questions focused on retrieving various data from a database. The questions cover a range of topics including product pricing, customer information, employee details, order statistics, and supplier data. Each question specifies a particular query to extract specific information from the database.

Uploaded by

madrock.7201
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Database Lab Questions.

1.​ Display all products with UnitPrice greater than 20.​

2.​ List all customers from the country "USA".​

3.​ Show all employees with the title "Sales Representative".​

4.​ Retrieve all orders placed in the year 1997.​

5.​ Display the CustomerID and CompanyName of all customers.​

6.​ List all categories from the Categories table.​

7.​ Show all products that are currently discontinued.​

8.​ Display the first and last names of employees who report to employee ID 2.​

9.​ Retrieve all suppliers from the country "Germany".​

10.​Show the product names and their UnitsInStock.​

11.​Display all orders with Freight charges greater than 100.​

12.​List the cities of all customers without duplicates.​

13.​Retrieve the OrderID and OrderDate of orders shipped to London.​

14.​Show all products that belong to category "Beverages".​

15.​Display all employees with HireDate after 1995-01-01.​

16.​List the CompanyName and ContactName of all suppliers.​

17.​Show all products with UnitsOnOrder more than 50.​

18.​Retrieve all orders where the ShipCity is "Paris".​

19.​Display all categories with their Description.​


20.​List all employees with the title "Inside Sales Coordinator".​

21.​Display the CustomerID, OrderID, and OrderDate for all orders from customers in
"USA".​

22.​Show products with UnitPrice between 20 and 50.​

23.​List all orders along with the EmployeeName who handled them.​

24.​Show the total number of products in each category.​

25.​Retrieve the total units in stock for each supplier.​

26.​List the top 5 most expensive products.​

27.​Show customers who have never placed an order.​

28.​Retrieve orders along with the ShipperName.​

29.​Display the average UnitPrice of products for each category.​

30.​Show products where the product name contains "Choco".​

31.​List the number of orders placed by each customer.​

32.​Display the sum of Freight charges grouped by ShipCountry.​

33.​Show the highest unit price of products in each category.​

34.​List all orders shipped via "Speedy Express".​

35.​Retrieve employees along with the number of orders they handled.​

36.​Display all products with less than 20 units in stock.​

37.​Show customers along with the number of orders placed in 1997.​

38.​List products ordered more than 100 units in total.​

39.​Display all orders with ShipCity starting with "S".​

40.​Show products whose ProductName starts with "A" and are not discontinued.​
41.​Retrieve customers who ordered all products from the "Beverages" category.​

42.​List employees who have handled orders for customers in more than 2 countries.​

43.​Show the top 3 products with the highest total sales amount (Quantity × UnitPrice).​

44.​Display customers who placed orders with total Freight charges over 500.​

45.​Show products that have never been ordered.​

46.​Retrieve the employee who has processed the highest number of orders.​

47.​Display orders where all items are from the same category.​

48.​List the month-wise total sales for the year 1996.​

49.​Retrieve suppliers who provide more than 5 products.​

50.​Display the customer who spent the most in 1997.​

51.​Show employees who never handled an order in 1997.​

52.​Retrieve the average Freight per ShipCountry and sort descending.​

53.​List products along with the total quantity sold and rank them.​

54.​Show the OrderID where the order contains the highest number of distinct products.​

55.​Display customers who ordered more than 5 different products in a single order.​

56.​Retrieve the ShipperName that handled the most orders in 1996.​

57.​List products with total quantity sold less than 10 units.​

58.​Show the top 3 customers based on the total order value.​

59.​Display employees along with the average Freight of orders they handled.​

60.​Retrieve categories where the average UnitPrice of products is above 50.

You might also like