0% found this document useful (0 votes)
197 views58 pages

Homework #09 - Answers: Property

Uploaded by

Amira Okasha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
197 views58 pages

Homework #09 - Answers: Property

Uploaded by

Amira Okasha
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 58

Homework #09 – Answers

Question 1:

A database table PROPERTY, was set up to show the prices of properties for sale and the features
of each property. Part of the database is shown below.

NumberOfBathrooms
NumberOfBedrooms
PropertyType

BrochureNo

PriceIn$
Garden

Garage
Apartment A01 2 2 No Yes 95000

Apartment A09 2 1 No No 100000

Apartment A16 1 1 No No 150000

Bungalow B17 7 4 Yes Yes 750000

House H10 4 2 Yes No 450000

House H13 3 2 Yes No 399000

House H23 3 1 No Yes 250000

House H46 2 1 Yes Yes 175000

Give the number of fields that are in each record.


7
State which field you would choose for the primary key
 Brochure No
Give a reason for choosing this field.
 Uniquely identifies each property
State the data type you would choose for each of the following fields.
Garage
Boolean
Number of Bedrooms
Integer
PriceIn$
Real
State the output from this SQL query
SELECT PriceIn$, BrochureNo
FROM PROPERTY
WHERE PropertyType = 'House' AND
NumberOfBedrooms > 2 AND
NumberOfBathrooms > 1
ORDER BY PriceIn$;
Output
PriceIn$ BrochureNo
399000 H13
450000 H10
Write a SQL statements to display the brochure number, property type and price of all properties
with a garage below $200,000.
SELECT BrochureNo, PropertyType, PriceIn$
FROM PROPERTY
WHERE Garage = YES AND PriceIn$ < 200000;
Question 2:

A database table MARKS, was set up to record the test results for a class of students. Part of the
database is shown below.

StudentName ClassID Maths English Science History Geography

Diana Abur 0001 92 88 95 89 78

Ravi Gupta 0009 29 34 38 41 44

Chin Hwee 0010 43 47 50 45 52

John Jones 0013 37 67 21 28 35

Rosanna King 0016 21 13 11 27 15

Paul Smith 0017 70 55 65 62 59

Give the number of fields that are in each record


7
State which field you would choose for the primary key
Class ID
Give a reason for choosing this field.
Uniquely identifies each student
State the output from this SQL query
SELECT StudentName
FROM MARKS
WHERE History > 60 OR Geography >60
ORDER BY StudentName;
Output
StudentName
Diana Abur
Paul Smith
Write a SQL query to select and show the student names only of all students with less than 40
marks in both Maths and English.
SELECT StudentName
FROM MARKS
WHERE Maths < 40 AND ENGLISH < 40;
Question 3:

A picture gallery owner has decided to set up a database to keep information about the pictures
he has for sale. The database table, PICTURE, will contain the following fields:
Title; Artist; Description; CatalogueNumber; Size (area in square centimetres); Price;
Arrived (date picture arrived at gallery); Sold (whether picture is already sold)
State what data type you would choose for each field.
Title text
Artist text
Description text
CatalogueNumber text/integer
Size real
Price real
Arrived date
Sold Boolean
State which field you would choose for the primary key.
CatalogueNumber
Give a validation check that you can perform on each of these fields. Each validation check
must be different.
CatalogueNumber
Format check/Presence Check/Check Digit/Length check/uniqueness check
Size
Type check/Presence Check/Range Check
Price
Type check/Presence Check/Range Check
Arrived
Type check/Presence Check/Range Check/Format check/Select from calendar length check
Write SQL query to select and show the CatalogueNumber, Title
and Price of all unsold pictures by the artist ‘Twister’.
SELECT CatalogueNumber, Title,Price
FROM PICTURES
WHERE Artist = 'Twister' AND Sold = No;
Question 4:

A motor boat hire company decides to set up a database to keep information about boats that are
available for hire. The database table, BOAT, will contain the following fields:
BoatName; Model; EnginePower (in hp); NumberOfSeats;
LifeRaft (whether there is a life raft kept on the boat); DayPrice (price for a day’s hire).
Give the data type you would choose for each field.
BoatName text
Model text
EnginePower integer
NumberOfSeats integer
LifeRaft boolean
DayPrice real
State a validation check that you can perform on each of these fields. Each validation check
must be different.
BoatName
Presence Check/Type Check/Character Check
Model
Format check/Type check/Presence Check/Length check/ Use of Drop-down box to select
NumberOfSeats
Type check/Presence Check/Range Check/ Use of Drop-down box to select
DayPrice
Type check/Presence Check/Range Check
Write SQL query to select and show the BoatName, Model and
DayPrice of a day’s hire for all boats with 4 seats and an EnginePower of more than 100 hp.
SELECT BoatName, Model,DayPrice
FROM BOAT
WHERE NumberOfSeats = 4 AND EnginePower > 100;
Question 5:

A database table STAFFPHONE, was set up to show the telephone extension numbers for
members of staff working in a department store.

Name Department ExtensionNumber

Jane Smith Toys 129

Sue Wong Books 124

David Chow Toys 129

Amy Tang Household 123

Joe Higgs Books 124

Jane Smith Shoes 125

Adel Abur Shoes 125

Peter Patel Toys 129

Explain why none of the fields in the database can be used as a primary key.

 all (fields) have (1 mark) duplicate entries (1 mark)


 none (of the fields) (1 mark) have unique entries (1 mark)

State a field that could be added as a primary key.

 e.g. StaffNumber ….

Give a reason for choosing this field.

 ….. Uniquely identifies each member of staff//no duplicates//different for each member
of staff
Write SQL query to provide a list of all members of staff, in alphabetical order, grouped by
department.

SELECT Department, Name


FROM STAFFPHONE
ORDER BY Department, Name ASC;

Question 6:

A database table SOFASELECT, was set up to show the prices of suites, sofas and chairs for sale
from an online furniture warehouse. Part of the database is shown below.
BrochureNumber

NumberOfPieces
NumberOfSeats
Description

PriceIn$
Material

Colour
Recliner chair RC01 1 1 Leather Cream 600

Chair CH16 1 1 Vinyl Red 250

Chair CH10 1 1 Velvet Red 175

Sofa SF17 2 1 Leather Red 950

Sofa SF19 3 1 Vinyl Black 1000

Suite SU10 4 3 Velvet Green 1500

Recliner sofa RS23 4 1 Leather Cream 1200

Suite SU23 5 3 Leather Brown 950


How many fields are in each record?

State which field you would choose for the primary key.

BrochureNumber

Give a reason for choosing this field.

Uniquely identifies each record/each Brochure Number different/no duplicates

State the data type you would choose for each of the following fields.

Number of Seats

integer

PriceIn$

real

The SQL query below selects all the furniture in cream leather.

SELECT Description, PriceIn$,BrochureNumber


FROM SOFASELECT
WHERE Material = 'Leather' AND Colour ='Cream'
ORDER BY PriceIn$ DESC;

Show the output from the SQL query.

Description PriceIn$ BrochureNumber


Recliner sofa 1200 RS23
Recliner 600 RC01
chair

Write SQL query to select and show the brochure number, material, colour and price of all the
furniture with 3 or more seats.

SELECT BrochureNumber, Material, Colour, PriceIn$


FROM SOFASELECT
WHERE NumberOfSeats > 2;
Question 7:

A database table THEATRETOURS, was set up to show the tour dates, towns, number of seats
and prices in local currency for a Shakespeare play.

Town TourDate NumberOfSeats PriceLocalCurrency

Windhoek 05/09/2016 65 90

Windhoek 06/09/2016 65 90

Macon 27/08/2016 75 18

Wigan 18/08/2016 120 15

Algiers 01/09/2016 125 1350

Dumfries 20/08/2016 160 12.5

Bordeaux 29/08/2016 170 20

Turin 25/08/2016 200 17

Port Elizabeth 10/09/2016 200 110

Explain why none of the fields in the database can be used as a primary key.

 Town has duplicate entries/all fields can have duplicate entries


 Fields other than Town not suitable identifiers

State a field that could be added as a primary key.

Performance number …
Give a reason for choosing this field.
Uniquely identifies each performance
Write SQL query to provide a list of tour dates and seat prices in alphabetical order of town.
Display Town, TourDate and PriceLocalCurrency in this order.

SELECT Town, TourDate , PriceLocalCurrency


FROM THEATRETOURS
ORDER BY Town;

Question 8:

A database table PLAYPRODUCTION, was set up to show the performance dates, prices and
number of seats available at a theatre specialising in Shakespeare productions.

NumberSeatsCircle
NumberSeatsStalls

PriceCircleSeats$
PriceStallsSeats$
PerformanceDate
Play

As You Like It 01/07/2016 120 90 20 30

As You Like It 02/07/2016 85 45 30 40

As You Like It 09/07/2016 31 4 30 40

Macbeth 14/07/2016 101 56 25 35

Macbeth 15/07/2016 50 34 25 35

Macbeth 16/07/2016 12 5 35 50

Julius Caesar 22/07/2016 67 111 20 20

Julius Caesar 23/07/2016 21 24 15 15

A Comedy of Errors 30/07/2016 45 36 35 45

Give the number of fields that are in each record.


6
State the data type you would choose for each of the following fields.
Play text
NumberSeatsStalls integer
PriceStallsSeats $ real
SELECT Play, PerformanceDate
FROM PLAYPRODUCTION
WHERE NumberSeatsStalls > 100 OR NumberSeatsCircle > 100
ORDER BY Play;

Show what would be output from the SQL query.

Play PerformanceDate
As You Like 01/07/2016
It
Julius Caesar 22/07/2016
Macbeth 14/07/2016

Write SQL query to select all the productions with at least six seats left in the circle and show the
Play, Performance Date and Price Circle Seats $ in Performance Date order.

SELECT Play, PerformanceDate, PriceCircleSeats$


FROM PLAYPRODUCTION
WHERE NumberSeatsCircle >= 6
ORDER BY PerformanceDate;
Question 9:

There is a database that stores the following fields:


 EmployeeID, an employee ID which must be two letters followed by 4 numbers, e.g.
TY4587
 Manager, whether the employee is a manager or not
 AnnualHoliday, number of whole days’ annual holiday
 PayGrade, the employee’s pay grade which must be a single letter A–F
Complete the following table to identify:
 The most appropriate data type for each field
 An appropriate validation check for each field. You must use a different validation check for
each variable.

Variable Data type Appropriate validation check


EmployeeID Text Length Check / Presence Check /
Format Check / Type check
Manager Boolean Type Check / Presence Check
AnnualHoliday Integer Type Check / Range Check / Presence
Check
PayGrade Character Presence Check / Length Check / Type
Check
Question 10:

A database table, DEVICE, has been set up to record the electronic equipment used in a small
business.

DeviceID DeviceTyp User PurchaseDate PurchasePrice$ Portable


e

3 Desktop Alan Swales 14/02/2017 1350 No

4 Laptop Chantel Law 01/02/2016 1460 Yes

5 Tablet Abdula Saud 31/12/2016 1000 Yes

6 Desktop Abdula Saud 14/03/2017 1000 No

7 Laptop Alan Swales 15/03/2016 1700 Yes

8 Tablet Taona Jaji 16/12/2016 470 Yes

SELECT User
FROM DEVICE
WHERE Portable = Yes AND PurchasePrice$ > 1000
ORDER BY User;

Show what would be the output from the SQL query.

User

Alan Swales

Chantel Law

Write a SQL query to select all Desktop devices that were either purchased before 31/12/2016 or
cost under $1000. Only show the Device ID and Device Type.
SELECT DeviceID, DeviceType
FROM DEVICE
WHERE DeviceType = 'Desktop' AND (PurchasePrice$ < 1000 OR
PurchaseDate < #31/12/2016#);
Question 11:

A television (TV) store has a database table, TVSTOCK, for its new range of televisions. The table
stores the screen size of each TV, whether it will show 3D, whether the screen is curved or flat, if
the internet is available on the TV, if it has a built-in hard disk drive and the price. Part of the
database table is shown below.

TVID ScreenSize 3D CurvedFlat Internet HDD Price

TV15FTNIN 15 No FT No No 400

TV20FTNIN 20 No FT No No 800

TV37FTINT 37 No FT Yes No 1200

TV42FTINT 42 Yes FT Yes No 1500

TV50CVINT 50 Yes CV Yes No 2500

TV50FTINT 50 Yes FT Yes No 2000

TV50FTNIN 50 Yes FT No No 1750

TV55CVINT 55 Yes CV Yes No 3000

TV55FTINT 55 Yes FT Yes No 3500

TV55FTNIN 55 Yes FT No No 3000

TV60CVINT 60 Yes CV Yes Yes 4500

TV60FTINT 60 Yes FT Yes Yes 4000

TV65CVINT 65 Yes CV Yes Yes 5000

TV80CVINT 80 Yes CV Yes Yes 7000

State the type of the field TVID and give a reason for your choice.
 It is the primary key/key field with unique data
 (Fixed length) text field with alphanumeric data
Complete the table with the most appropriate data type for each field.

Field name Data type

ScreenSize Integer

3D Boolean

CurvedFlat Text

Internet Boolean

HDD Boolean

Price Real

Write a SQL query to provide a list of all of the curved screen TVs that have a built-in hard disk
drive. Make sure the list only displays the TVID, the price and the screen size in ascending order of
price.
SELECT TVID, ScreenSize,Price
FROM TVSTOCK
WHERE CurvedFlat = 'CV' AND HDD = YES
ORDER BY Price;
Question 12:

A database table, SHEEP, is used to keep a record of the sheep on a farm. Each sheep has a unique
ear tag, EARnnnn; n is a single digit. The farmer keeps a record of the date of birth, the gender and
the current weight of each sheep in kilograms.
Identify the four fields required for the database. Give each field a suitable name and data type.
Provide a sample of data that you could expect to see in the field.
Field 1 name EarTag
Data type text
Data sample EAR1011
Field 2 name DOB
Data type date
Data sample 04/03/2017
Field 3 name Gender
Data type text
Data sample M
Field 4 name Weight
Data type real
Data sample 5.9
State the field that you would choose as the primary key.
EarTag
Write a SQL query to identify the ear tags of all male sheep weighing over 10 kilograms. Only
display the ear tags.
SELECT EarTag
FROM SHEEP
WHERE Gender ='M' AND Weight > 10;
Question 13:

A wildlife park has a database table, called LIVESTOCK, to classify and record its animal species.
Part of the database table is shown.

Species Classification Diet Legs

Giraffe Mammal Herbivore 4

Elephant Mammal Herbivore 4

Crocodile Reptile Carnivore 4

Ostrich Bird Omnivor 2


e

Gorilla Mammal Herbivore 2

Bear Mammal Omnivor 4


e

Rhinoceros Mammal Herbivore 4

Hippopotamu Mammal Herbivore 4


s

Flamingo Bird Omnivor 2


e

Lion Mammal Carnivore 4

Turtle Reptile Omnivor 4


e

Penguin Bird Carnivore 2

Suggest another appropriate field that could be added to this database by stating its name and data
type. State its purpose and give an example of the data it could contain.
Field name SpeciesID
Data Type Alphanumeric
Purpose Primary key
Example of data SP06583
Field name Number
Data Type Integer
Purpose To record how many of that species there are at the park
Example of data 30
Write a SQL query to provide a list of all four legged mammals that are herbivores, sorted
alphabetically by species, with only the species displayed.
SELECT Species
FROM LIVESTOCK
WHERE Classification = 'Mammal'
AND Diet = 'Herbivore' AND Legs = 4
ORDER BY Species ASC;
Question 14:

A database table, TRAIN, is to be set up for a railway company to keep a record of the engines
available for use. Each engine has a unique number made up of 5 digits, nnnnn. The engines are
classified as freight (F) or passenger (P) together with a power classification that is a whole number
between 0 and 9, for example F8. The railway company keeps a record of the date of the last service
for each engine.
Identify the three fields required for the database. Give each field a suitable name and data type.
Provide a sample of data that you could expect to see in the field.
Field 1 Name EngineNumber
Data type text/Integer
Data sample 21012
Field 2 Name Class
Data type text
Data sample P6
Field 3 Name ServiceDate
Data type date
Data sample 04/03/2017
State the field that you should choose as the primary key
EngineNumber
Write the structured query language (SQL) to identify all passenger engines that have not been
serviced in the past 12 months. Only display the engine numbers.
SELECT EngineNumber
FROM TRAIN
WHERE Class LIKE 'P*' AND ServiceDate < #10/11/2016#;
Question 15:

A database table, BIKETYRES, is used to keep a record of tyres for sale in a cycle shop.
Tyres are categorised by width and diameter in millimetres, whether they have an inner tube and
the type of terrain for which they are designed.

TyreCode Width Diameter Tube Terrain StockLevel

LLNH 28 700 NO Hard 7

LLNM 28 700 NO Mixed 18

LLNT 28 700 NO Asphalt 19

LLTM 28 700 YES Mixed 12

MLNM 24 700 NO Mixed 22

MLNT 24 700 NO Asphalt 23

MLTH 24 700 YES Hard 5

MLTM 24 700 YES Mixed 14

MSNM 24 650 NO Mixed 4

MSNT 24 650 NO Asphalt 8

SLNM 23 700 NO Mixed 12

SLTH 23 700 YES Hard 10

SLTM 23 700 YES Mixed 22

SLTT 23 700 YES Asphalt 18

SSNT 23 650 NO Asphalt 10

SSTM 23 650 YES Mixed 5

Write SQL query to show the tyre code and stock level in ascending order of stock level for all
24mm asphalt terrain tyres.
SELECT TyreCode, StockLevel
FROM BIKETYRES
WHERE Width = 24 AND Terrain = 'Asphalt'
ORDER BY StockLevel ASC;
Question 16:

The table, BEVERAGES, shows the number of calories in 100ml of a range of popular beverages.
It also shows the availability of these drinks in a can, a small bottle and a large bottle.

BevN BevName Calorie Can SmallBottle LargeBottle


o s

Bev01 Cola 40 Yes Yes Yes

Bev02 Lime 45 Yes No Yes

Bev03 Energy Drink 1 52 Yes Yes No

Bev04 Energy Drink 2 43 Yes No No

Bev05 Mango 47 Yes No Yes

Bev06 Lemon Iced Tea 38 Yes No Yes

Bev07 Lemonade 58 Yes Yes Yes

Bev08 Orange Juice 46 Yes Yes No

Bev12 Apple Juice 50 Yes Yes No

Bev15 Chocolate Milk 83 Yes Yes No

Give a reason for choosing BevNo as the primary key for this table.
Each data value is unique
State the number of records shown in the table BEVERAGES.
10 records
List the output that would be given by this SQL query.
SELECT BevNo, BevName
FROM BEVERAGES
WHERE Can = YES AND SmallBottle = YES and LargeBottle = YES
ORDER BY BevName DESC;

BevNo BevName
Bev07 Lemonade
Bev01 Cola

Write SQL query to output a list showing just the names and primary keys
of all the beverages with a calorie count greater than 45. The list should be in alphabetical
order of names.
SELECT BevNo, BevName
FROM BEVERAGES
WHERE Calories > 45
ORDER BY BevName ASC;

Write SQL query to show the total number of calories in all beverages
SELECT SUM (Calories)
FROM BEVERAGES;

Write SQL query to show the count of all beverages with a calorie count greater than 40.
SELECT COUNT (BevName)
FROM BEVERAGES
WHERE Calories > 40;
Question 17:

A database table, FLIGHT, is used to keep a record of flights from a small airfield. Planes can
carry passengers, freight or both. Some flights are marked as private and only carry passengers.

FlightNumbe Plane Notes DepartureTime Passengers


r

CN101 Caravan 2 Freight only 08:30 No

CN102 Piper 1 Freight only 09:00 No

CN108 Caravan 2 Freight only 08:00 No

CN110 Lear Private passenger flight 08:00 Yes

FN101 Caravan 1 Private passenger flight 08:00 Yes

FN104 Piper 2 Passengers only 09:20 Yes

FN105 Piper 1 Freight and passengers 10:00 Yes

FN106 Caravan 1 Passengers only 10:30 Yes

State the field that could have a Boolean data type.


Passengers
A SQL query has been written to display just the flight numbers of all planes leaving
after 10:00 that carry passengers only and private passengers flight.
SELECT Passengers
FROM FLIGHT
WHERE Passengers = Yes AND DepartureTime = #10:00#;

Explain why the SQL query is incorrect, and write a correct SQL query.
Explanation
 Flight number not displayed
 Passengers displayed when should not be
 Departure time = not >
 "Freight and passengers" flight not excluded
Correct SQL query
SELECT FlightNumber
FROM FLIGHT
WHERE Notes = 'Passengers only' OR 'Private passenger flight' AND
DepartureTime > #10:00#;
Question 18:

A database table, TRAIN, is used to keep a record of train departures from a station.

TrainNumber Platform Destination DepartureTim Status


e

1A37 1 Newtown 08:00:00 AM On time

2X19 2 Anytown 08:10:00 AM Late

1A29 1 Bigcity 08:15:00 AM On time

1A28 2 Anytown 08:30:00 AM Cancelled

1A67 3 Gardenvillage 08:45:00 AM On time

1A37 1 Newtown 08:50:00 AM On time

1A24 2 Charter Train 09:00:00 AM Late

1A67 3 Gardenvillage 09:15:00 AM On time

Explain why the field Train Number could not be used as a primary key.
Number is repeated/not unique
A SQL query has been written below to display only the train numbers and platforms of all trains
leaving after 08:30 that are late.
SELECT Platform
FROM TRAIN
WHERE Platform = 'Y' AND DepartureTime < #8:30# OR Status =
'Late';

Explain why the SQL query is incorrect, and write a correct SQL query.
Explanation
 Train number not displayed
 Departure time before 8:30
 Criteria of =Y for Platform not required/incorrect
 All late trains will be shown/the condition should use AND not OR
Correct SQL query
SELECT TrainNumber,Platform
FROM TRAIN
WHERE DepartureTime > #8:30# OR Status = 'Late';
Question 19:

A car manufacturer makes a range of car models named Pegasus, Apollo and Cupid. It keeps a
database to store the records of its range and the different options for each car model. Within the
table CAR_RANGE, the following data needs to be stored:
1. Car model
2. Body style – saloon, hatchback or estate
3. How many doors it has
4. Whether it uses petrol, diesel or batteries as fuel
5. An identifier for a specific car.
Complete the table to show suitable field names and an example of appropriate data for each
field in the database table CAR_RANGE.

Field name Example of data

CarID ID07

Model Pegasus // Apollo // Cupid

BodyStyle estate //saloon // hatchback

Doors 1 // 2 // 3 // 4 // 5

FuelType batteries // petrol // diesel

State which of your fields would be most appropriate for a primary key and give a reason for
your choice.
 CarID
 Which contains unique values to identify each record
Write the SQL query to provide a list of car models using petrol and the
number of doors these cars have, in alphabetical order of car model. Display only the car
models and the number of doors.
SELECT Model,Doors
FROM CAR_RANGE
WHERE FuelType = 'Petrol'
ORDER BY Model ASC;
Question 20:

A database table, SALES, is used to keep a record of items made and sold by a furniture maker.

ItemNumber OrderNumber Notes Amoun Status


t

CH001 1921 Smith - six dining chairs 6 Delivered

TB003 1921 Smith - large table 1 In progress

CH001 1924 Hue- extra chairs 4 In progress

CH003 1925 For stock 2 Cancelled

BN001 1927 Patel - replacement bench 1 Not started

ST002 1931 Sola - small table 1 Delivered

CH003 1927 Patel - eight dining chairs with arms 8 Not started

TB003 1927 Patel - large table 1 Not started

Explain why the field Item number could not be used as a primary key

Number is repeated/not unique


A SQL query has been written below to display only the order number and item numbers of
any items in progress or not started.
SELECT OrderNumber, Amount
FROM SALES
WHERE Status <> 'Delivered';

Explain why the SQL query is incorrect, and write a correct SQL query.
Explanation
 Item number not displayed/Amount column not required
 Not Like ‘Delivered’ will also show cancelled items
Correct SQL query
SELECT ItemNumber, OrderNumber
FROM SALES
WHERE Status = 'Not Started' OR Status = 'In progress';
Question 21:

A teacher has decided to use a database table as her mark book for her Computer Science class,
which she has called MARKBOOK. For each student, the following data will be recorded: first
name, last name, their year 10 test score and their year 11 test score. The class has 32 students.
State the number of fields and records required for this database.
Number of Fields 4
Number of Records 32
The data in MARKBOOK is stored under category headings: LastName, FirstName,
Y10TestScore and Y11TestScore.
State, with a reason, whether any of these headings would be suitable as a primary key.
 No field is suitable as a primary key…
 …because none of the data would be unique // duplicates could occur
Write the SQL query to only display the first name, last name and year 10
test score of each student who achieved 50 or more in their year 10 test. The output should
be in test score order with the highest marks at the top of the list.
SELECT FirstName, LastName, Y10TestScore
FROM MarkBOOK
WHERE Y10TestScore >=50
ORDER BY Y10TestScore DESC;
Question 22:

A garden centre sells garden tools and stores details of these in a database table named TOOLS.
Code is the primary key in the TOOLS table.

Code Description Price Quantity_Stock Quantity_Ordered


$

GFLG Garden Fork 50 1 50

GHLG Garden Hoe 45 8 0

GSLG Garden Spade 50 11 0

HCSM Hedge Clippers 40 45 0

HFSM Hand Fork 9.99 42 0

HS20 Hose (20 metres) 45 10 0

HS35 Hose (35 metres) 60 2 0

HS50 Hose (50 metres) 75 20 60

HSSM Hand Spade 9.99 40 0

HWS Hand Weeder 9.99 11 0


M

LMBT Lawn Mower (Battery) 249.99 7 0

LMHD Lawn Mower 99.99 5 0

LMPT Lawn Mower (Petrol) 349.99 10 25

SHSM Shears 40 40 0

TRBT Edge Trimmer (Battery) 79.99 15 0

TRPT Edge Trimmer (Petrol) 59.99 20 0

YBLG Yard Brush 24.99 100 0

State the purpose of the primary key in the TOOLS table.


To uniquely identify a product (in TOOLS)
List the output from the data shown in the table TOOLS that would be given by this SQL query.
SELECT Code, Description, Quantity_Ordered
FROM TOOLS
WHERE Price$ > 40 AND Quantity_Stock > 0 AND Quantity_Ordered > 0
ORDER BY Quantity_Ordered DESC;

Code Description Quantity_Ordere


d
HS50 Hose (50 metres) 60
GFLG Garden Fork 50
LMP Lawn Mower (Petrol) 25
T

Write the SQL query to output the tools where the quantity in stock is below 25. Only show the
Code, Description and Quantity_Stock fields in ascending order of Code.
SELECT Code, Description, Quantity_Stock
FROM TOOLS
WHERE Quantity_Stock < 25
ORDER BY Code ASC;
Question 23:

A database table, JUICE, is used to keep a record of cartons of fresh fruit juice available for sale.

JuiceCode Fruit1 Fruit2 Size Volum StockLevel


e

LAA10 Apple Apple Large 1000 32

LMM10 Mango Mango Large 1000 5

LMO10 Mango Orange Large 1000 18

LOO10 Orange Orange Large 1000 25

LPP10 Pineapple Pineapple Large 1000 3

MGG05 Guava Guava Medium 500 5

MMM05 Mango Mango Medium 500 12

MOO05 Orange Orange Medium 500 8

MOP05 Orange Pineapple Medium 500 12

SAA02 Apple Apple Small 200 50

SAM02 Apple Mango Small 200 25

SGO02 Guava Orange Small 200 10

SMO02 Mango Orange Small 200 7

SOO02 Orange Orange Small 200 40

SPP02 Pineapple Pineapple Small 200 10

Identify a suitable field to use as the primary key. State a reason for your choice.
Juice code
only unique identifier
Write SQL query to display only the stock level and size of all cartons containing only apple juice.
SELECT Size, StockLevel
FROM JUICE
WHERE Fruit1 = 'Apple' AND Fruit2 = 'Apple';
Question 24:

A convenience store which sells general groceries wants to set up a database table called STOCK.
The table will contain fields including a description of the item, the price of the item and the
number in stock for each item. The STOCK table also has a fourth field to be used as a primary
key. Complete the table to suggest a suitable field name for each of the four fields in the table
STOCK. Give the purpose of the data to be stored in each field. [4]

Field name Purpose of field contents

CodeNo Primary key to identify products

Product To describe the product

Price The price of individual item

NumInStock How many are in stock

Write the SQL query to output stock items where the quantity in stock has fallen below 20. Only
show the primary key and description of the items. [4]
SELECT CodeNo, Product
FROM STOCK
WHERE NumInStock < 20;
Question 25:

A database table, BOX, is used to keep a record of boxes made and sold by a craftsman. Boxes are
categorised by:
 SIZE – small, medium or large
 SHAPE – brief description for example ‘star shaped’
 WOOD – maple, beech, walnut or ebony
 PRICE – price in $
 SOLD – whether the box is sold or not.
A database management system uses these data types:
Text Number Real Boolean
Select the most appropriate data type for each field from the four types shown. State the reason why
you chose the data type. [5]
SIZE data type text
Reason
expressed as a single word
SHAPE data type text
Reason
short phrase required
WOOD data type text
Reason
expressed as a single word
PRICE data type Real
Reason
may be used in calculations
SOLD data type Boolean
Reason
only two choices
Write the SQL query to only display the price of small walnut boxes.
SELECT Price
FROM BOX
WHERE Size = 'Small' AND WOOD = 'Walnut';

The SQL query from previous question needs to be changed to show both walnut and beech boxes
and display the wood used. Change the previous SQL query to show the new changes.
SELECT Price, WOOD
FROM BOX
WHERE Size = 'Small' AND (WOOD = 'Walnut' OR WOOD ='Beech');
Question 26:

A database table, CHOCBAR, is used to keep a record of chocolate bars sold. Chocolate bars are
categorised by:
 SIZE – small or large
 FILLING – brief description, for example mint crunch
 PRICE – price in Rupees, for example ₹2.50
 NUMBERSOLD – how many sold
A database management system uses these data types:
Text Integer Real Boolean
Select the most appropriate data type for these three fields from the four data types shown.
Each data type must be different. State the reason why you chose the data type.
SIZE data type text
Reason
expressed as a single word // Boolean, only two choices
PRICE data type real
Reason
may be used in calculations
NUMBERSOLD data type integer
Reason
integer values/could be used in calculations
Write SQL query to display only the price, filling and number sold of small chocolate bars that have
sold fewer than 10 bars.
SELECT FILLING, PRICE
FROM CHOCBAR
WHERE Size = 'Small' AND NUMBERSOLD < 10;
Question 27:

A database table, AIRLINE, stores data used to compare airlines.

Code AirlineNam NumberOfEmployees NumberOfCountrie HeadOffice SharePrice


e s

BJ BlueJet 15000 7 Africa 215.45

FJ FastJet 60000 30 Europe 514.5

JS JetSeven 45000 22 Asia 257.44

K3 Koala3 22000 11 Australia 501.21

MA MurphyAir 35000 8 Europe 152.67

NS NorthState 30000 4 America 108.22

PF PandaFly 50000 35 Asia 317.88

SK SkyKing 32000 27 Europe 506.12

SS SouthState 30000 4 America 126.35

State how many fields and how many records are shown in the AIRLINE table.
 6 fields
 9 records
Show the output that would be given by this SQL query.
SELECT AirlineName, HeadOffice
FROM AIRLINE
WHERE NumberOfEmployees < 35000 AND SharePrice >500.00;

AirlineName HeadOffice
Koala3 Australia
SkyKing Europe
Write SQL query to find every airline with a head office in Asia or Africa, and number of countries
greater than 4. Only show the airline name and number of countries.
SELECT AirlineName, NumberOfCountries
FROM AIRLINE
WHERE NumberOfCountries > 4 AND
(HeadOffice = 'Asia' OR HeadOffice= 'Africa');
Question 28:

The table AUDIOPARTS stores the part number, description, cost and quantity in stock of the
items sold by a music shop.

PartNum Description Cost Quantity

A01 Compact Amplifier Case 50 15

A02 Deluxe Amplifier Case 75 1

A03 Amplifier Standard 79.99 48

A04 Amplifier Midrange 149.99 50

A05 Amplifier Megablaster 299.99 48

S01 Tweeter 59.99 10

S02 Midrange Woofer 99.99 0

S03 Subwoofer 139.99 16

S04 Tower Speaker Basic 159.99 25

S05 Tower Speaker Skyscraper 219.99 9

S06 Centre Speaker 149.99 25

S07 Soundbar 89.99 2

S20 Soundbar 129.99 0

S21 Ceiling Surround Speaker 75 15

S22 Ceiling Full Range 100 1


Speaker

S25 Surround Speaker 100 60


State the number of records in the table AUDIOPARTS
16
Identify the field that is most suitable to be a primary key and give a reason for your choice.
PartNum
The data stored in this field is unique for each record
Write SQL query to show the items where the quantity in stock is fewer than 10. Show all the fields
from the database table in descending order of cost.
SELECT *
FROM AUDIOPARTS
WHERE Quantity < 10
ORDER BY Cost DESC;

Write SQL query to show the total cost of all parts


SELECT SUM (Cost) AS TotalCost
FROM AUDIOPARTS;

Write SQL query to show the count of all parts with a cost less than 100.00.
SELECT Count (PartNum) AS NumOfParts
FROM AUDIOPARTS
WHERE Cost < 100.00;

Question 29:

A marine wildlife rescue centre uses a database table, MARINE, to keep records of its creatures.

Creature Class Quantity ReadyForRelease Offspring

Manta Ray Fish 3 Yes No

Short-tailed Albatross Bird 4 Yes No

Emperor Penguin Bird 50 Yes Yes

Bluefin Tuna Fish 2 No No

Manatee Mamma 4 Yes No


l

Hawksbill Turtle Reptile 10 Yes Yes

Hammerhead Shark Fish 3 Yes No

Yellow-eyed Penguin Bird 4 Yes No

Kemp's Ridley Sea Turtle Reptile 1 Yes No


State how many fields and how many records are shown in this table.
5 fields
9 records
Show the output that would be given by this SQL query.
SELECT Creature, ReadyForRelease
FROM MARINE
Where Class = 'Bird';

Creature ReadyForRelease
Short-tailed Yes
Albatross
Emperor Penguin Yes
Yellow-eyed Penguin Yes

Write SQL query to display the creatures, in ascending order of quantity, that have no offspring and
are ready for release. Display only the creature field.
SELECT Creature
FROM MARINE
Where Offspring = No AND ReadyForRelease = Yes
ORDER BY Quantity ASC;
Question 30:

A library uses a database table, GENRE, to keep a record of the number of books it has in each
genre.

ID GenreName Total Available Loaned Overdue

ABI Autobiography 500 250 250 20

BIO Biography 650 400 250 0

EDU Education 20200 10000 10200 1250

FAN Fantasy 1575 500 1075 13

GFI General Fiction 35253 23520 11733 0

GNF General Non-Fiction 25200 12020 13180 0

HFI Historical Fiction 6300 3500 2800 0

HNF Historical Non-Fiction 8000 1523 6477 0

HUM Humour 13500 9580 3920 46

MYS Mystery 26000 13269 12731 0

PFI Political Fiction 23561 10523 13038 500

PNF Political Non-Fiction 1823 750 1073 23

REF Reference 374 374 0 0

ROM Romance 18269 16800 1469 0

SAT Satirical 23567 12500 11067 0

SCF Science Fiction 36025 25000 11025 0

SPO Sport 45720 32687 13033 3256

THR Thriller 86000 46859 39141 0

State the reason ID could be used as a primary key in the table GENRE.
The data in the ID column/field is unique/not repeated in each row/record
State the number of records in the table GENRE.
18
Write SQL query to display any genres with overdue books. Only display the ID, GenreName and
Overdue fields in order of the number of books overdue from largest to smallest.
SELECT ID, GenreName, Overdue
FROM GENRE
WHERE Overdue > 0
ORDER BY Overdue DESC;
Question 31:

A database table, PLANT, is used to keep a record of plants sold by a nursery. The table has these
fields:
 NAME – name of plant
 FLOWER – whether the plant flowers (Yes) or not (No)
 POSITION – shade, partial shade or sun
 SIZE – small, medium or large
 PRICE – price in $
 NUMBERSOLD – how many sold
A SQL query statements has been written to display only the price, name and number sold of small
plants that do not flower.
SELECT NAME, PRICE,NUMBERSOLD
FROM
WHERE POSITION ="Shade";

Identify the errors in the SQL query.


 TABLE name is not written after FORM
 POSITION criteria not required
 No criteria set in the size
 No criteria set in the flower
Rewrite the corrected SQL query.
SELECT NAME, PRICE, NUMBERSOLD
FROM PLANT
WHERE SIZE = 'Small' AND FLOWER = No;
Question 32:

A car hire company uses a database table, TREAD, to store details of the cars. The table has fields
to represent each car’s licence number, mileage, and the tread depth of each of its four tyres.
Suggest suitable names for each of the fields described.
Field name

 LicenceNo
 Mileage
 TyreFLft
 TyreFRgt
 TyreRLft
 TyreRRgt
Write SQL query to display cars where all four tyres have a tread depth of less than 2. Display all
the fields, using the field names you created in previous question. The output should be sorted by
licence number.
SELECT *
FROM TREAD
WHERE TyreFLft < 2 AND TyreFRgt < 2
AND TyreRLft < 2 AND TyreRRgt < 2
ORDER BY LicenceNo DESC;
Question 33:

A database table, FLOWER, is used to keep a record of the type of flowers available to make up a
bouquet.

FlowerID Type Colour Style Fragrance

CN001 Carnation Pink Stem Yes

CN002 Carnation Red Stem No

CN103 Carnation White Stem No

CN104 Carnation Yellow Stem Yes

CN105 Carnation Pink Spray Yes

CN106 Carnation Red Spray No

CN107 Carnation White Spray No

CN108 Carnation Yellow Spray Yes

LY101 Lily White Spray Yes

RE101 Rose Pink Stem Yes

RE102 Rose Red Stem Yes

RE103 Rose White Stem No

RE104 Rose Yellow Stem Yes

RE105 Rose Orange Spray Yes

RE106 Rose Peach Spray No


A SQL query has been written to display just the type, style and colour of all flowers that have no
fragrance.
SELECT FlowerID, Fragrance, Style, Colour
FROM FLOWER
WHERE Fragrance = Yes;

Explain why the SQL query is incorrect and write a correct SQL query.
Explanation
 Field, FlowerID, not required / should not be displayed
 Type field not included and displayed
 Fragrance field should not be displayed
 Fragrance criteria should not be Yes / should be No

SELECT Type, Style, Colour


FROM FLOWER
WHERE Fragrance = No;
State the output from this SQL query
SELECT Type, Colour
FROM FLOWER
WHERE Fragrance = No
ORDER BY Type ASC, Colour ASC;

Type Colour
Carnation Red
Carnation Red
Carnation White
Carnation White
Rose Peach
Rose White
Question 34:

A database table, APPLIANCE, is used to keep a record of kitchen appliances available for sale.
The following data is stored for each appliance:
 CATEGORY – washer, dishwasher, fridge or freezer
 ECONOMYRATING – A, B, C or D
 MANUFACTURER – Baku or ABC
 PRICE – price in $
 CODE – a unique code allocated by the manufacturer e.g. B982
 STOCK – number in stock.
The database management system uses these data types:
Text Real Integer Boolean Character
The ECONOMYRATING field has a data type of character and MANUFACTURER field has a
data type of text.
Identify the most appropriate data type for each field from the four types shown. State the reason
why you chose each data type.
CATEGORY – Text characters / words only used
PRICE – Real, may be used in calculation
CODE – Text no calculations required, could be numbers or characters
STOCK – Integer, comparisons and calculations may be required
Write SQL query to display only the category, manufacturer and code of the appliances with an
economy rating of A.
SELECT CATEGORY, MANUFACTURER, CODE
FROM APPLIANCE
WHERE ECONOMYRATING = 'A';
Question 35:

A pet supplier uses the database table, PRODUCTSTOCK, to keep records of its products for pets.
The fields are:

Field name Description

ProductID code to identify the product

ProductName name of product

ProductDescription information about the product

Animal type of animal the product is for, e.g. cat, bird, horse

ProductType type of product, e.g. food, toy, medicine

InStock whether the product is in stock or not

Identify the field that could have a Boolean data type.


InStock
Identify the field that should be used as the primary key.
ProductID
Write SQL query to output the products intended for a cat that are in stock. Display only the
primary key and the name of the products. The output should be sorted by the primary key.
SELECT ProductID, ProductName
FROM PRODUCTSTOCK
WHERE Animal = 'Cat' AND InStock = Yes
ORDER BY ProductID ASC;
Question 36:

A database table, COMPUTER, is used to keep a record of computers available for sale.
The following data is stored for each computer:
 CATEGORY – desktop, laptop or tablet
 WEIGHT – weight in kilograms
 MANUFACTURER – ICN, Linoldo, Pear or JoeSing
 PRICE – price in $
 CODE – a unique code allocated by the manufacturer, e.g. P771
 STOCK – quantity in stock.
A database management system uses these data types:
Text Integer Real Boolean
The CATEGORY field and MANUFACTURER field have a data type of text.
Select the most appropriate data type for each field from the four types shown. State the reason why
you chose the data type.
 WEIGHT – Real, comparisons / calculations may be required
 PRICE – Real, calculations may be required
 CODE – Text, no calculations required, could be numbers or characters
 STOCK – Integer, comparisons / calculations may be required
Write SQL query to display only the category, manufacturer, price and code of the computers with
weight of less than 2.5 kilograms.
SELECT CATEGORY, MANUFACTURER, PRICE, CODE
FROM COMPUTER
WHERE WEIGHT < 2.5
Question 37:

A computer game shop records its stock levels in a database table called GAMES. The fields used
in the stock table are shown.

Field name Description

GameID primary key

GameName the name of each game

AgeRestriction the minimum age at which a person is allowed to play each game

GamePrice the selling price for each game

NumberStock the quantity of each game currently in stock

OnOrder whether or not each game is on order from the suppliers

DateLastOrdered the date the most recent order for each game was placed

GameDescription a summary of the contents and purpose of each game

State the number of fields that are in the table GAMES.


8
State one important fact that must be true for a field to be a primary key.
The primary key field must be unique/different for each record in the table
Write SQL query to output all the games that have no stock and that are on order with the supplier.
Display only the GameID, GameName and GamePrice fields in alphabetical order of the name of
the game
SELECT GameID, GameName, GamePrice
FROM GAMES
WHERE NumberStock = 0 AND OnOrder = Yes
ORDER BY GameName ASC;
Question 38:

A database table, NURSE, is used to keep a record of disposable items worn by veterinary nurses.
This is part of the table:

ItemNumbe
Description SingleUse Uses StockLevel ReorderLevel
r

DIG1 Glove (pair) Yes 1 500 800

DIA1 Apron Yes 1 700 800

DIM5 Hair net Yes 1 650 500

DIA2 Apron No 5 25 100

DIS4 Suit No 3 70 50

DIV9 Shoe cover (pair) Yes 1 400 250

Write SQL query to display only the item number and the description of single use items, where the
stock level is below the reorder level.
SELECT ItemNumber, Description
FROM NURSE
WHERE SingleUse = Yes AND StockLevel < ReorderLevel;

Give a reason why the field SingleUse is not required in the table NURSE.
the field Uses already shows this information // duplication of data // redundant data
Question 39:

Data about planets in the solar system is stored in a database table called PLANETS. The fields
used in the table are shown.

Name of field Description

PlanetName the name of the planet

PlanetMass the planet’s mass in kilograms

Larger whether or not the planet has a greater mass than Earth

MaxDistance the maximum distance the planet is from Earth in kilometres

MinDistance the minimum distance the planet is from Earth in kilometres

OnOrder whether or not each game is on order from the suppliers

YearLength the length of time it takes for the planet to orbit the Sun in Earth days

State the name of the field that could contain Boolean data.
Larger
Write SQL query to output the planets with a longer year length and greater mass than Earth.
Assume Earth’s year length is 365 days. Display only the name of the planets sorted in alphabetical
order
SELECT PlanetName
FROM PLANETS
WHERE Larger = Yes AND YearLength > 365
ORDER BY PlanetName ASC;
Question 40:

A database table, 2018MOV, is used to keep a record of movie details.

CatNo Title Genre1 Genre2 Blu-ray DVD Streaming

18m0
Power Rangers Adventure Fantasy Yes No Yes
1

18m0
Baywatch Comedy Drama Yes No Yes
2

18m0
Table 19 Comedy Drama Yes Yes No
3

18m0
Wonder Woman Action Fantasy Yes No Yes
4

18m0
Justice League Action Fantasy Yes Yes Yes
5

18m0
Twilight Thriller Action Yes Yes No
6

18m0
Ant Man Action Fantasy No Yes No
7

18m0
Venice Beach Action History No Yes No
8

18m1
Fast Five Action Thriller No Yes No
2

18m1
King Kong Adventure Fantasy No Yes No
5

18m1
Transformers: The Last Knight Action Sci-Fi Yes Yes Yes
6

18m1
The Dark Tower Fantasy Sci-Fi Yes Yes No
7

18m1
Beauty and the Beast Fantasy Romance Yes Yes Yes
9

18m2
The Mummy Action Fantasy No No Yes
1

18m2
Star Wars: Episode VIII Sci-Fi Action Yes No Yes
2

18m2
Guardians of the Galaxy Action Sci-Fi Yes Yes Yes
3
18m2
Thor Action Sci-Fi No Yes Yes No
6

18m2
Twilight Fantasy Sci-Fi No No Yes
7

18m3
Beneath Action Fantasy Yes No No
0

18m3
Despicable Me Animation Action Yes Yes No
1

State the number of records in the database table.


20
Give the name of the field that would be used for the primary key
CatNo
State the reason for choosing this field for the primary key.
it is a unique identifier
Complete the table to identify the most appropriate data type for each field based on the data shown
in the database table, 2018MOV.

Name of field Description

CatNo Text

Title Text

Genre1 Text

Streaming Boolean

Complete the structured query language (SQL) to return the category number and title for all
Comedy movies.
SELECT CatNo, Title

FROM 2018MOV
WHERE Genre1 = "Comedy";
Question 41:

A shop that sells books has set up a new database table called BookList to store book details.
Part of this table is given.

State the number of records in this part of the database table.


20
Give the name of the field that would be used for the primary key.
CatNo
State the reason for choosing this field for the primary key.
It is a unique identifier // no repeated values
Complete the table to identify the most appropriate data type for each field based on the data shown
in the table BookList

Write the output from this structured query language (SQL) statement.
SELECT CatNo, Title, Author
FROM BookList
WHERE StockLevel = 0;

BK08 The Princesses’ Story B Penn


BK31 Networking for Beginners A Smith
Complete this SQL statement to display all the titles by the author B Penn
SELECT Title
FROM BookList
WHERE Author = "B Penn" // Author = 'B Penn' // Author Like "B Penn"
Question 42:

A database table, PERFORMANCE, is used to keep a record of the performances at a local theatre.

State the number of fields and records in the table.


Fields
5
Records
8
Give two validation checks that could be performed on the ShowNumber field.

 length check
 type check
 presence check
 format check
Show the output that would be given by this structured query language (SQL) statement:
SELECT Date, Title
FROM PERFORMANCE
WHERE NOT SoldOut AND Type = "Jazz";

03 Nov Acoustic Evening


Question 43:

A database table called TVRange shows the main features and prices of a range of televisions.

Give the name of the field that is most suitable to be the primary key.
State the reason for this choice
 TVCode
 Each entry in this field is a unique identifier
The database uses the data types:
 text
 character
 Boolean
 integer
 real
 date/time.
Complete the table to show the most appropriate data type for each field.
Each data type must be different.

Complete the structured query language (SQL) query to return the television (TV) code,
screen size and price of all Smart TVs in the database table.
SELECT TVCode, ScreenSize, Price$
FROM TVRange

WHERE SmartTV = YES;


Question 44:

A music streaming service has a new database table named Songs to store details of songs

available for streaming. The table contains the fields:


 SongNumber – the catalogue number, for example AG123
 Title – the title of the song
 Author – the name of the song writer(s)
 Singer – the name of the singer(s)
 Genre – the type of music, for example rock
 Minutes – the length of the song in minutes, for example 3.75
 Recorded – the date the song was recorded.

Identify the field that will be the most appropriate primary key for this table.
SongNumber
Complete the table to identify the most appropriate data type for the fields in Songs

Explain the purpose of the structured query language (SQL) statements.


SUM (Minutes) FROM Songs WHERE Genre = "rock";

COUNT (Title) FROM Songs WHERE Genre = "rock";

 to find the total number of minutes of music


 to find the total number of songs
 available for the genre rock
Question 45:

A database table called Site1 stores details of some holiday homes at a holiday park. The

database shows the type of home, number of guests, whether it is privately owned and the weekly
rate to hire it.

State the number of fields and the number of records in this database table.
 Fields 5
 Records 12
Describe the purpose of a primary key.
to uniquely identify a record
The database uses the data types:
 alphanumeric
 character
 Boolean
 integer
 real
 date/time.
Complete the table to show the most appropriate data type for each field.

Give the output that would be produced by the structured query language (SQL) statement:
SELECT Name, NumberGuest, Rate$
FROM Site1
WHERE NumberGuest >= 10;

Bay Lodge 10 1000


Coppice Lodge 12 1200
West Lodge 12 1200

You might also like