I have a table like this:
PostId | Body | AuthorId 2 b F 2 b E 4 d A 4 d E 8 h F
So what I want is to get all the rows that have more that 1 appearance of
PostId. Here the result would be 2 and 4 because they appear more than 1 time. I want this in relational algebra.
I have already a relation that works just fine but in this relation I use aggregation methods and I don’t really what to use
count in my relation. I am wondering if there is a way to this with subtraction or division operators?
What I do for now is
π PostId (σ c ≥ 2 ( γ Body; COUNT(PostId)->c R2)) to get the row with more than 1 appearance of
Thanks in advance for help