Support ongoing development - donate to help us maintain and improve the platform. 🖥️ Support sqltest →
SQL code copied to buffer
Task 16:

Actors Duets

MySQL
Find acting duos who have appeared together in more than five films.
Output the result as a table with columns: 
    - actor_id, first_name, last_name - identifier, first and last name of the first actor, 
    - actor_id, first_name, last_name - identifier, first and last name of the second actor,
    - films_together - the number of films in which they starred together.

In each line, we first display the actor with the last name higher in alphabetical order. Sort the results in descending order of number of collaborations, then by the last name of the first actor.
Expected result Columns: 7 · Rows: 6
actor_id first_name last_name actor_id first_name last_name films_together

Sample rows open after wrong checks: 0 of 3

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query

Hi! Could we please enable some services and cookies to improve your experience and our website?

Privacy & Cookie Policy.