ByteSizeNotes

0478/21/M/J/26 · Question: 9(c)

A swimming club wants to set up a new database table to store details of the members of the club and the maximum distance each member swam in metres.

The table is called SWIMMERS and will contain these fields:

  • Distance – distance the member swam, for example 1500
  • Date – date the member swam the distance
  • Time – time taken to swim the distance
  • MemberID – the code to identify a member, for example TH749
  • MemberName – name of the member.

Complete the structured query language (SQL) statement to display only the names of the members who swam a distance of 1500 metres or more.

SQL practice

Fictional practice records use the table and field names from the question. Complete the gaps (____) in the supplied SQL. Running SQL does not mark your answer.

Click a gap and type to replace it, then run your SQL.

View database records

[3]

Your answer stays in this browser tab.
Mark scheme [3]

One mark for each correct line

SELECT MemberName
FROM SWIMMERS
WHERE Distance >= 1500;

Finished checking?

Mark this question complete when you have checked your answer. Completion is not a grade.

Loading your progress…

Start fresh?

DATABASE LAB

Entity relationship diagram

PK = primary key · FK = foreign key. Lines connect foreign-key fields to the fields they reference. Only relationships defined in SQL are shown.