Posted by swetha, Dec. 11, 2023, 9:56 p.m.
question 41
hi leon, i am working on question 41 and not sure why my results is not matching with expected output
i am using this code
with cte1 as (
select actor_id,count( film_id) as film_cnt
from film_actor
group by actor_id
order by count(film_id) desc
),
cte2 as(
select *,
case when film_cnt>=30 then 'Productive'
else 'less-productive'
end as actor_cat
from cte1
)
select actor_cat,count(*)
from cte2
group by actor_cat