Dbms
Dbms
Dbms
Query:
FROM Customer_T
2)Get all orders placed in the last 30 days, showing only order
date and customer ID
Query:
FROM Order_T
When you use Date() - 30, it calculates the date 30 days before the current date. So, if today's date is #11/9/2024#, then Date() - 30 would be
#10/10/2024#.
Query:
Query:
FROM Product_T
Query:
SELECT SalespersonName
From Salesperson_T
Query:
SELECT Count ( OrderID) AS OrderCount, OrderID
FROM OrderLine_T
GROUP BY OrderID
7) List all orders and display only the employee ID who processed
each order.
Query:
8) Retrieve all product names and IDs for products that are
currently in stock.
Query:
FROM Product_T
9) Get the names and IDs of customers who have placed orders
with a total quantity above 100.
Query:
Query:
FROM Product_T
Query:
FROM [Product_T]
12) Get all order details where the quantity ordered is greater
than 10.
Query:
SELECT *
FROM OrderLine_T
Query:
FROM Product_T
14) Show all customers who registered within the past year but
not within the last 6 months.
Query:
15) Get the employee IDs and salaries of the top 3 highest-paid
employees.
Query:
Query:
Query:
FROM OrderLine_T
WHERE ProductID = 1
GROUP BY ProductID
18) Find customers who have placed more than 10 orders,
showing only their customer IDs.
Query:
SELECT CustomerID
FROM Order_T
GROUP BY CustomerID
Query:
FROM Product_T
Query:
FROM Employee_T