Worked Examples · Example 14
Q.Write an SQL query to display the Name and Marks of all students of class 'XI-A' whose Marks are greater than 75, from the Student table.
ChseodishaTextbookSubjectiveImportance★★★★★est
93% · 14/15 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →The SELECT statement reads data from a table. Three things are needed here:
- Choosing columns: because only
NameandMarksare wanted (not every column), we name those two columns afterSELECTinstead of using*. - Filtering rows: we add a
WHEREclause. There are two conditions — the class must beXI-A, and the marks must be greater than 75. - Combining conditions: because both must be true, we join them with the logical operator
AND. The comparisonMarks > 75uses the greater-than operator, and the text value'XI-A'is written in single quotes.
The complete query is:
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.