STARTER
SHOW YOUR WORKING
1.
First let’s finish our notes from Teach-ICT.com
CHALLENGE 1
The two tables Product and Supplier form a relational
database used by a shoe shop.

(a)
State the primary key of the Supplier table and
justify your choice. (2)
(b)
List the results of executing the following SQL
query on the database above. (4)
SELECT Product.Name, Product.Quantity, Supplier.PostCode
FROM Product, Supplier WHERE Product.Quantity > 40 AND
Supplier.Name = ‘Trainers4Us’
AND Product.SupplierCode = Supplier.SupplierCode
(c)
Write an SQL statement to add the following data
to the Product table: (3)
444AA Slippers
6.99 32 100
CHALLENGE 2
(a) Look at the Products table. Write an SQL
statement that orders the products alphabetically by supplier name (3)
(b) Look at the Products table. Write an SQL
statement that orders the by the quantity with the largest first? (3)
No comments:
Post a Comment