Relational algebra - what is the proper way to represent a 'having' clause? -
yes, homework question names have been changed protect innocent. meaning, not asking homework question itself, rather small part of can understand whole.
let's have sql query this:
--the query list car prices occur more once.
select car_price cars group car_price having count (car_price) > 1;
the general form of in relational algebra y (gl, al) r y greek symbol, gl list of attributes group, al list of aggregations
so relational algebra like:
y (count(car_price)) cars
so, how "having" clause written in statement? there shorthand? if not, need select relation? maybe?
select (count(car_price) > 1) [y (count(car_price)) cars]
i have searched internet on hours , have found no examples of converting having relational algebra. help!
select count(*) (select * cars price > 1) cars;
also known relational closure.
Comments
Post a Comment