I am practising writing relational algebra (RA) expressions in RA interpreter from Duke, but I can't figure out how to represent group by or having (from SQL). I have this expression, but I need to group it by countries, and get only those that have count>5 (I can work around count with another query, but I don't know how to group):

\project_{country, count(*)}(locationTable);

Also, is there order by in RA?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.