DBMS SQL QUESTIONS
1. Display the salesman_no, sal_name, s_order_no, and order_status of all
salesmen who have placed orders.
2. Display all order numbers and salesman names, even if the salesman doesn’t
exist in the sales_master table.
3. List all salesmen and their orders. Include salesmen without orders and
orders without matching salesmen.
4. Display s_order_no, sal_name, product_no, qty_order, and product_rate for
all orders.
5. List all pairs of salesmen where one has a higher sal_amt than the other.
6. Show all possible combinations of salesmen and products (assuming
product_master exists).
7. List all orders and display the number of products not yet delivered (where
qty_disp < qty_order).
8. Find the total qty_order and average product_rate for each salesman.
9. Display all order numbers, salesman names, and total value (qty_order *
product_rate) for orders with order_status = 'fulfilled'.
10. Display the salesman name, city, and total sales amount for each
salesman, and show only the salesman(s) having the maximum total sales
value (based on qty_order * product_rate). List all salesmen who have at
least one order with pending deliveries (qty_disp < qty_order), along with
the number of such pending orders.
11. For each month and salesman, display the total number of orders and total
sales value. Sort the result by month and salesman name.
12. Find all product numbers that have been ordered by more than one
salesman and show how many distinct salesmen have ordered each product.