← Quiz: Relational Algebra: all 15 questions
Quiz: Relational Algebra · Question 14 of 15
Which SQL query matches π name, city (σ cgpa 8 (students))?
Which SQL query matches π name, city (σ cgpa > 8 (students))?
- A.SELECT * FROM students WHERE cgpa > 8
- B.SELECT name, city FROM students
- C.SELECT DISTINCT cgpa FROM students WHERE cgpa > 8
- D.SELECT DISTINCT name, city FROM students WHERE cgpa > 8
Answer & explanation
Correct answer: SELECT DISTINCT name, city FROM students WHERE cgpa > 8
σ becomes WHERE, π becomes the column list with DISTINCT (algebra works with sets).
Can you get the rest right without peeking?
Take the timed Quiz: Relational Algebra quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →