Easy SQL Challenge: Using INNER JOIN

365 Days of Daily Coding: Day 49

I had a fantastic day. I am outright lying. It was a terrible day. Nothing specific happened but I just don’t feel right. It’s one of those days where you think your having your period soon but the guest has already arrived and is atleast overdue for the next 20 plus days or so.

Today I solved an easy challenge. I have to say I am really enjoying the journey I have come so far. It’s the joy I guess that has made me stuck to my coding journey. I have gotta fully explore it. I have been wondering if it’s not too late to even switch to software engineering as a career.

I have also been trying my hands on freelance content writing but perhaps should I try copywriting instead. They are shorter, to the point and gotta be creative to sway people. Sounds interesting!

Easy Challenge:

SELECT actor_id, first_name, last_name
FROM(
SELECT DISTINCT a.actor_id, a.first_name, a.last_name, 
COUNT(f.film_id) AS counts
FROM actor a JOIN film_actor f
ON a.actor_id = f.actor_id
GROUP BY a.actor_id
ORDER BY counts DESC) AS k
LIMIT 1;

Leave a comment