🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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))?

  1. A.SELECT * FROM students WHERE cgpa > 8
  2. B.SELECT name, city FROM students
  3. C.SELECT DISTINCT cgpa FROM students WHERE cgpa > 8
  4. 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 →