3
TOPIC : QUERY (COMPLEX ) 1. A database has been set up by a car dealer to maintain information on cars currently available for sale. A section of the database is shown below. a) If the following query was input (Top Speed (kph) > 250) OR (Doors = 2) using Ref No only, which items would be output? b) Write down a query which outputs cars which cost more than $60 000 and have a 0-100 kph time (sec) of less than 7

Exercise : Complex Query

Embed Size (px)

Citation preview

Page 1: Exercise : Complex Query

TOPIC : QUERY (COMPLEX )

1. A database has been set up by a car dealer to maintain information on cars currently available for sale. A section of the database is shown below.

a) If the following query was input

(Top Speed (kph) > 250) OR (Doors = 2)

using Ref No only, which items would be output?

b) Write down a query which outputs cars which cost more than $60 000 and have a 0-100 kph time (sec) of less than 7

Page 2: Exercise : Complex Query

2. A shop keeps its stock file on a computer system. Part of the file is shown in the diagram below:

The following codes have been used.

B = Black G = Green R = Red S = Silver

a) Which STOCK NO data will be listed if the following search condition is input?

(COLOURNOT “B”) AND (WEIGHT (KG)< 2.0)

b) Write down a search condition that will search for all the items with less than 16 in stock

and the price is more than $100