Reputation: 1615
I have a SQL query as following:
select uname, city from USER
where uid =
(
select bidder from BID
group by bidder
order by count(*) desc limit 1);
The SQL query is to find the user's username and city who has made the most bids. But I don't know how to express the limit operator in relational/extend relational algebra.
Thanks!
Upvotes: 1
Views: 3534
Reputation: 462
I looked in Navathe's book and couldn't find any limit operator in relational algebra. This made me think that there's no limit operator in classical relational algebra. After a research, Alexander Serebrenik confirm that in "relational algebra for Limit Operator" question!
Upvotes: 2