Given the relations
Which of the following queries cannot be expressed using the basic relational algebra operations $\left(\sigma, \pi,\times ,\Join, \cup, \cap,-\right)$?
Possible solutions, relational algebra:
(a) Join relation using attribute dpart_no.
(d) Let the given department number be $x$
(c) We cannot generate relational algebra of aggregate functions using basic operations. We need extended operations here.
@Mithlesh Upadhyay sir @Arjun sir @srestha mam plz explain one thing.
In option (b) the following alternative query was used
my question is , USING Selection operator do we need to include depart_no. as well when the sole aim is to find out the equality of
name of empl and dept name. ..???
@SomeEarth emp.depart_no.=depart.depart_no. is included because of this statement:
Employees whose name is the same as their department name
SQL Query without aggregation but as said by @reena_kandari can't do sum operation!
SELECT DISTINCT x FROM table WHERE x NOT IN (SELECT table1.c FROM table AS t1 JOIN table AS t2 ON t1.c < t2.c)
@ashutoshaay26 what's the output of this query?