How many episodes are there in the 9th season of Law and Order? Calculate the average number of casts per season of the said series.
the 9th season refers to season = 9; Law and Order refers to series = 'Law and Order'; cast refers to category = 'Cast'; average number of casts per season = divide(count(person_id), count(episode_id))
SELECT SUM(CASE WHEN T2.season = 9 THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T2.season = 9 THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.episode_id) FROM Credit AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.category = 'Cast' AND T2.series = 'Law and Order'