edited by
1,869 views
4 votes
4 votes

Consider a relation $\text{examinee (regno, name, score)},$ where regno is the primary key to score is a real number.

Suppose the relation $\text{appears (regno, centr_code)}$ specifies the center where an examinee appears. Write an SQL query to list the centr_code having an examinee of score greater than $80.$ 

edited by

1 Answer

14 votes
14 votes
SELECT DISTINCT centr_code
FROM appears
WHERE regno IN (SELECT regno
               FROM examinee
               WHERE score > 80)

Related questions

7 votes
7 votes
3 answers
1
go_editor asked Feb 8, 2018
1,987 views
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number.Write an SQL query to list the regno of examinees who have a s...
16 votes
16 votes
2 answers
2
Kathleen asked Sep 14, 2014
3,687 views
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number.Write a relational algebra using $( \Pi, \sigma, \rho, \times)...