-1

I have a table with three columns: actor, movie and role. How do I form a relational algebra query to find actors who played the same role in multiple movies? I.e. the rows would have the same name and role but different movie.

I've thought of finding actors that have played the same role multiple times by first getting a count of the number of roles and then selecting rows which have count > 1. How to proceed?

philipxy
  • 14,416
  • 5
  • 32
  • 77
  • Post the query you have developed and the RDBMS you are using. – Chris Albert Jun 01 '22 at 17:06
  • Does this answer your question? [Relational algebra for banking scenario](https://stackoverflow.com/questions/24423150/relational-algebra-for-banking-scenario) – philipxy Jun 01 '22 at 20:48
  • There are many relational algebras. They differ in operators & even what a relation is. Give operator definitions & your reference for yours. Eg textbook name, edition & page. Nested algebra calls form a programming language. So give as much of a [mre] as you can. But--Google 'run relational algebra online'. Please show what parts you are able to do. [Homework](https://meta.stackoverflow.com/q/334822/3404097) [Research effort.](https://meta.stackoverflow.com/q/261592/3404097) [ask] [Help] PS Relational algebra <> relational calculus. – philipxy Jun 01 '22 at 20:56
  • Does this answer your question? [Using Relational Algebra, how can I find duplicate rows in a tuple?](https://stackoverflow.com/q/19864120/3404097) – philipxy Jun 01 '22 at 20:59
  • I gave a link that addresses relational algebra querying anything. But your specific query also is a faq. Please before considering posting read the manual/reference & google any error message & many clear, concise & precise phrasings of your question/problem/goal, with & without your particular names/strings/numbers, 'site:stackoverflow.com' & tags; read many answers. If asking reflect research. – philipxy Jun 01 '22 at 21:02

0 Answers0