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 →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Astronomy & Space Science
  • Earth & Environmental 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. Quizzes
  2. /The table Ponds has the fields Pond, Fish and Frogs, and these 5 records: (P1, 12, 4), (P2, 5, 9), (P3, 20, 7), (P4, 8, 2), (P5, 15, 6). What does SELECT Pond, Fish FROM Ponds WHERE Fish > 6 AND Frogs > 3 ORDER BY Fish DESC; output?
Computer ScienceHardHigh School (9–10)Algorithms, Programming and Logic › Databases and SQLIGCSE
StemPy LabCreated by StemPy Lab
Read about Databases and SQL first

A database stores data in an organised way so that it can be searched quickly. In a single-table database, each row is a record, such as one student, and each column is a field, such as a name or a date of birth. Each field has a data type, and the primary key is a field that is unique for every record. SQL is the language used to ask questions of a database. A query such as SELECT name FROM students WHERE age > 15; picks out the records you need. ORDER BY sorts them, and SUM and COUNT give totals.

Lessons, worked problems and more questions on Databases and SQL →

The table Ponds has the fields Pond, Fish and Frogs, and these 5 records: (P1, 12, 4), (P2, 5, 9), (P3, 20, 7), (P4, 8, 2), (P5, 15, 6). What does SELECT Pond, Fish FROM Ponds WHERE Fish > 6 AND Frogs > 3 ORDER BY Fish DESC; output?

Ponds with more than 6 fish: P1, P3, P4 and P5. Of these, more than 3 frogs: P1, P3 and P5. Most fish first: P3 20, P5 15, P1 12. The reverse order is ASC. Including P4 forgets the frogs condition. The last option forgets to sort.
Log in to save
← All Quizzes
← A teacher wants the lessons on Monday or Tuesday and writes SELECT Lesson FROM Timetable WHERE Day = 'Mon' OR 'Tue';. Which is the correct script?The table Kits has the fields Kit, Size, Colour and Qty, and these 5 records: (K1, M, Blue, 4), (K2, L, Blue, 2), (K3, M, Red, 5), (K4, S, Blue, 1), (K5, M, Blue, 3). The script SELECT ______ FROM Kits WHERE Size = 'M' ______ Colour = 'Blue'; must output 7. Which pair fills the two gaps? →
More onAlgorithms, Programming and Logic › Databases and SQL

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. A script SELECT COUNT(*) FROM Shirts WHERE Size = 'S' AND Size = 'L'; outputs 0, although the…Hard
  2. The table Pupils has the fields Name, Choir and Band, and these 6 records: (Ama, TRUE, FALSE)…Hard
  3. The table Kits has the fields Kit, Size, Colour and Qty, and these 5 records: (K1, M, Blue, 4)…Hard
  4. A teacher wants the lessons on Monday or Tuesday and writes SELECT Lesson FROM Timetable WHERE Day…Hard
  5. The table Vans has the fields Van, Zone and Parcels, and these 5 records: (V1, Town, 14), (V2…Hard
All questions on this topic →

Problems 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
All problems on this topic →