WorksheetsDatabases and SQL
Total questions: 30
Worksheet time: 30mins
SQL is
Structured Query Language
Simple Query Language
Structured Question Language
Structure Quality Language
Less than or equal to?
>=
=>
=<
<=
Which word is missing from the following SQL statement?
Select * table_name;
With
Where
From
And
This symbol is placed immediately after the SELECT command to display all the fields.
$
%
=
*
Which statement is used to extract data from a database?
Extract
Get
Open
Select
Greater than or equal to?
>=
=>
=<
<=
What is the correct order of clauses in a SQL statement?
SELECT, FROM, ORDER BY, WHERE
SELECT, FROM, WHERE, ORDER BY
SELECT, WHERE, FROM, ORDER BY
WHERE, FROM, SELECT, ORDER BY
What is the 'FROM' command used for?
The criteria which must be met
The fields to display
The field and order used to sort the results
The table used in the query
What is the 'SELECT' command used for?
The fields to display
The table used in the query
The criteria which must be met
The field and order used to sort the results
How is the 'WHERE' command used?
The table used in the query
The fields to display
The field and order used to sort the results
The criteria which must be set
How is the 'ORDER BY' command used?
The fields to display
The field and order used to sort the results
The table used in the query
The criteria that must be met
What is a field?
A collection of information
A single item of information
A list of information
A group of records
Which symbol would you use to represent more than 50?
= 50
< 50
> 50
# 50
How many records are in this table?
7
6
5
4
How many fields are there?
4
5
6
7
Which field is the key field?
ID
Name
HighScore
Competition
Which ID is returned for the SQL statement?
SELECT * FROM Gymnasts WHERE Name='Xavier';
0001
0002
0003
0004
0005
How many records would be returned by the following SQL?
SELECT * FROM songs WHERE TimesPlayed >=3;
0
2
3
4
How many records would be returned by the following SQL?
SELECT * FROM songs WHERE Length < 3 AND Protected = True;
0
2
3
4
What is missing in this code?
SELECT * FROM WHERE genre = ‘action’ ORDER BY year ASC;
Which statement will show all fields and records from the table called "celebs"?
SELECT * FROM celebs;
SELECT FROM celebs;
SELECT forename, surname FROM celebs;
SELECT celebs;
The SQL statement being run is:
SELECT player_name, score FROM leaderboard;
What is the name of the table in this query?
SELECT
player_name
score
leaderboard
The SQL statement being run is:
SELECT player_name, score FROM leaderboard;
How many columns of results will be shown when this query is run?
0
1
2
3
Which SQL statement will show the names and heights of all basketball players taller than 200?
SELECT name FROM Player WHERE height >200;
SELECT name FROM Player WHERE height >=200;
SELECT name, height FROM Player WHERE height >200;
SELECT name, height FROM Player WHERE height <200;
Which SQL statement will show the names and weights of all wrestlers lighter than 170?
SELECT name, weight FROM Wrestler WHERE weight >170;
SELECT name, weight FROM Wrestler WHERE weight <= 170;
SELECT name, weight FROM Wrestler WHERE weight <170;
SELECT name, weight FROM Wrestler WHERE weight >=170;
Which character always appears at the end of a SQL statement?
;
:
,
.
Which of these statements will show all wrestlers sorted from the heaviest to the lightest?
SELECT * FROM Wrestler WHERE weight <170;
SELECT * FROM Wrestler WHERE weight >170;
SELECT * FROM Wrestler ORDER BY weight ASC;
SELECT * FROM Wrestler ORDER BY weight DESC;
Which of these statements will show all wrestlers in alphabetical order of their name
SELECT * FROM Wrestler ORDER BY name ASC;
SELECT * FROM Wrestler ORDER BY name DESC;
SELECT * FROM Wrestler ORDER BY weight ASC;
SELECT * FROM Wrestler ORDER BY weight DESC;
Which SQL statement will show the names and heights of all basketball players sorted from smallest to tallest?
SELECT name FROM Player ORDER BY height ASC;
SELECT name FROM Player ORDER BY height DESC;
SELECT name, height FROM Player ORDER BY height ASC;
SELECT name, height FROM Player ORDER BY height DESC;
SELECT * FROM Customers ......
