HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A teacher stores test results as (Student, Score): (Ama, 64), (Ben, 70), (Chloe, 88), (Dev, 69)…
HardComputer ScienceHigh School (9–10)Computer Science › Databases and SQLNumericalConceptualIGCSE

A teacher stores test results as (Student, Score): (Ama, 64), (Ben, 70), (Chloe, 88), (Dev, 69)…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A teacher stores test results as (Student, Score): (Ama, 64), (Ben, 70), (Chloe, 88), (Dev, 69), (Ezra, 75), (Femi, 52), (Gia, 70). The table is called Results.

She wants the names of the students who scored at least 707070. Her first try is:

sql
SELECT Student FROM Results WHERE Score > 70;
  1. How many names does her script output?
  1. How many names should be output?
  1. Correct the script.

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

WHERE keeps only the records for which the condition is true. The operators are =, <>, >, <, >= and <=. Text goes in quotes, numbers do not, and a Boolean field is compared with TRUE or FALSE. The field in the condition need not be selected.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Step 1. Her script. Score > 70 keeps Chloe (888888) and Ezra (757575): 222 names.

Step 2. What is wanted. At least 707070 means 707070 or more, so Ben and Gia (exactly 707070) belong too: Ben, Chloe, Ezra and Gia. That is 444 names.

Step 3. The correction.

sql
SELECT Student
FROM Results
WHERE Score >= 70;

The output:

table
Student
Ben
Chloe
Ezra
Gia

Watch out. "At least" is >=, "more than" is >. "At most" is <=, "less than" is <.

Answer: (a) 222. (b) 444. (c) SELECT Student FROM Results WHERE Score >= 70;.

Log in to save this for later
← All Problems
← A school books rooms from this table. Write a script that outputs the room number of every room…A fair lists its rides and the length of each ride in minutes in a table Rides… →
More onComputer Science › Databases and SQL

Discussion (0)

Log in to join the discussion.

Loading…

Learn it in

  1. WHERE: choosing the recordsSQL Queries: SELECT, WHERE and ORDER BY

More on this topic

  1. A restaurant stores its staff in a table Staff…Hard
  2. A town library stores its readers in a table Readers…Medium
  3. A gym stores its members in a table Gym…Easy
  4. A school garden club records each plot in a table Plots: the water it needs each day in litres, its…
Hard
  • A school weather station stores one record a day in a table Weather: the rainfall in millimetres…Medium
  • All problems on this topic →