You are on page 1of 2

1.

List customer codes and customer addresses in the customer table

π CustomerID, CustomerAddress(Customers)

2. List the product name and product quantity in the product table

π ProductName, NumInStock(Products)

3. List product codes and product names with a quantity of products in stock
greater than 500 products.

σ NumInStock >500 (π ProductID, NumName(Products))

4. Find out the customer code and Invoice date of the customer with an address
in Nam Dinh.

π CustomerID, DateInvoice (σ CustomerAddress = ‘Nam Dinh’ ( Invoice


⋈ Customers) )

5. List names of customers who had purchase invoices on 12-09-2023.

π CustomerName (σ DateInvoice =’12-09-2023’( Customers ⋈ Invoice))

6. List product codes and product names with unit prices greater than
10.000.000
ΠProductID,ProductName (σPriceUnit>10,000,000(Products ⨝
InvoiceDetails))
7. Find out the name of the customer with an address in Son La with a purchase
invoice on 13-09-2023

ΠCustomerName(σCustomerAddress=’Son La’ AND DateInvoice=’13-09-


23’(Customers ⨝ Invoice))

8. List product codes and product names sold on 14-09-2023.

π ProductID, ProductName (Products * (σ DateInvoice =’ 14-09-2023’(Invoice


⋈ InvoiceDetails))

9. List product codes that have never been sold

π ProductID(Products)−(π ProductID(InvoiceDetails))
10. List customer codes that have never made a purchase on 11-09-2023

π CustomerID(Customers) – (π CustomerID(σ DateInvoice = ‘11-09-


2023’(Invoice))

You might also like