equivalent SQL query :-
select e1.name from examine e1 where exist ( select * from examine e2 where e1.regno ≠ e2.regno and e1.name = e2.name );
@Devesh_Kumar
The query is designed only to select the tuples where registration numbers are not same, but name is same.
So, it'll obviously give correct result for two different persons with same name.
Hi @Ayush Upadhyaya@Shaik Masthan How above RA will ensure that two person having same name appear more than once in examination?
1) $\Pi_{name}\left ( \sigma _{count(cnt)>1}\left ( _{name}g_{count(regno)\ as \ cnt}\left ( examinee \right ) \right ) \right )$
2) $SELECT_{regno}FROM\;examinee\; HAVING\;(score>avg(score))$
$\Pi _{regno}\left ( \sigma _{score>avg(score)}\left ( examinee \right ) \right )$
3) $SELECT_{centr\_code}FROM\;examinee\;join\;appears WHERE\;(score>80)$
$\Pi _{center\_code}\left ( \sigma _{score>80}\left ( examinee\Join appears \right ) \right )$
@Sheshang
I dont think so standard relational algebra allows aggregate functions.
2.
64.3k questions
77.9k answers
244k comments
80.0k users