You are on page 1of 2

DELHI PUBLIC SCHOOL BANGALORE EAST

Cambridge International
Academic Session 2021-22
MPT Revision
Subject: Computer Science Topic: Database worksheet 1
Name: Class: IX Roll No. :

1. A database table called TestResults has been created to hold details of students’ test
results. Part of the table is shown below.

StudentID Surname Firstname Gender Result


5432 Khayat Hakim M 41
5478 Ashton Sam M 34
5479 Howe Gary M 31
5530 Mata Kelly F 66
5548 Ronson Sam M 64
5600 Walker Marcus M 59
5602 Moore Steven M 47
5739 Okello Paulette F 61
5814 Ashton Belinda F 28

(a) The maximum mark obtainable on the test was 70. Write the query to select all the
students who scored below half marks in the test. The output should be displayed in
order of surname and firstname.

(b) Show the output from this query

(c) Show the output from this query.

SELECT StudentID, Surname, Firstname, Gender, Result

FROM TestResults

WHERE Gender = ‘F’

ORDER BY Result;

(d) Which field can be selected as primary key?

(e) How many records and fields are there in the table ?

1
2

Write the query to select all the students with more than 60 marks in History or more
then 60 marks in Geography in ascending order of StudentName.

(d) Show the output from this query

(e) Write the query to select and show the student names only of all student with less than
40 marks in both maths and English.

You might also like