vendredi 11 septembre 2015

Combine rows in sqlite using group_concat but limit grouping to 2

I have the following tables movies(id integer, name text, score integer)
moviecast(movie_id integer, cast_id integer, cast_name text)
And I want the following table good_collaboration(cast_member_id1,cast_member_id2,av g_movie_score, movie_count) such that pair of stars who have appeared in at least three movies together AND those movies have average scores >=75.

Any thoughts how can I achieve that?

Aucun commentaire:

Enregistrer un commentaire