Re: Re: Untitled

From Commodious Monkey, 2 Months ago, written in SQL, viewed 98 times. This paste is a reply to Re: Untitled from Светлана Шаронова - view diff
URL Embed
Download Paste or View Raw
  1. SELECT AS name_category,
  2.         COUNT(DISTINCT m.film_id) AS total_films
  3. FROM movie AS m
  4. LEFT JOIN film_actor AS fa ON m.film_id = fa.film_id
  5. LEFT JOIN actor AS a ON fa.actor_id = a.actor_id
  6. LEFT JOIN film_category AS fc ON fc.film_id = m.film_id
  7. LEFT JOIN category AS c ON fc.category_id = c.category_id
  8. WHERE fa.actor_id IN
  9. (
  10.     SELECT fa.actor_id
  11.     FROM film_actor AS fa
  12.     LEFT JOIN movie AS m ON fa.film_id = m.film_id
  13.     WHERE m.release_year>2013
  14.     GROUP BY fa.actor_id
  15.     HAVING COUNT(fa.film_id)>=7
  16. )
  17. GROUP BY name_category
  18. ORDER BY total_films DESC, name_category

Replies to Re: Re: Untitled rss

Title Name Language When
Re: Re: Re: Untitled Tinct Agouti sql 2 Months ago.

Reply to "Re: Re: Untitled"

Here you can reply to the paste above