School Revise · Class 11 Informatics Practices · Chapter 7
Code 065, Class 11. Querying asks questions of the data in a table. Here we select, filter, sort and summarise rows with SQL.
|
|
SELECT reads data from a table. A WHERE clause filters rows, ORDER BY sorts them, and DISTINCT removes repeats.
SELECT * FROM STUDENT shows every column; naming columns shows only those. WHERE keeps only the rows that match a condition.
|
SELECT name FROM STUDENT WHERE marks > 80; (shows names of students who scored above 80) |
ORDER BY column sorts the result (ASC or DESC). DISTINCT lists each value once.
Aggregate functions summarise: COUNT, SUM, AVG, MAX, MIN. GROUP BY makes one summary per group.
Explore the idea by tapping. The interactive opens right here in the lesson.
Type each one into the code lab above, then open the card to see the worked solution and its output.
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SOLUTION
OUTPUT
SELECT.
WHERE.
ORDER BY.
DISTINCT.
|
SELECT reads data; naming columns limits what is shown. WHERE filters rows, ORDER BY sorts (ASC or DESC) and DISTINCT lists each value once. Aggregate functions COUNT, SUM, AVG, MAX and MIN summarise data, and GROUP BY makes one summary per group. |
| Open the Virtual Lab |
These free Class 11 Informatics Practices notes explain SQL querying, SELECT with WHERE and ORDER BY, DISTINCT, aggregate functions and GROUP BY with worked examples and practice, for CBSE students across India and the Gulf including the UAE, Saudi Arabia, Qatar, Oman, Kuwait and Bahrain.
© 2026 School Revise. All rights reserved. Original content aligned to the CBSE and NCERT Class 11 Informatics Practices syllabus. Unauthorised copying is not permitted.