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 (Product)

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

greater than 500 products.

ΠProductID, ProductName (σ NumInStock > 500) (Product)

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

in Nam Dinh.

ΠCustomerID, DateInvoice (σ CustomerAddress = “Nam Dinh”) (Customers ⋈ Invoice)

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

ΠCustomerName (σ DateInvoice = “12-09-23”) (Customers ⋈ Invoice)

6. List product codes and product names with unit prices greater than

10.000.000

ΠProductID, ProductName (σ PriceUnit > 10.000.000) (Product ⋈ 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” (Customers) ⋈ σ DateInvoice = “13-09-23”


(Invoice))

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

ΠProductID, ProductName (InvoiceDetails * (σ DateInvoice = “14-09-23” (Product ⋈ Invoice)))

9. List product codes that have never been sold

ΠProductID (Product) - ΠProductID (InvoiceDetails)


10. List customer codes that have never made a purchase on 11-09-2023

ΠCustomerID (Customers) - (ΠCustomerID (σ DateInvoice = “11-09-23”) (Invoice))

You might also like