Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how can i write this to give me 0 instead of NULL in the total_combined_film_length column? SELECT actor.actor_id AS actor_id, actor.first_name AS first_name, actor.last_name AS

how can i write this to give me 0 instead of NULL in the total_combined_film_length column?
 SELECT actor.actor_id AS actor_id, actor.first_name AS first_name, actor.last_name AS last_name, animation.total_combined_film_length FROM actor actor LEFT JOIN ( SELECT act.actor_id AS actor_id, SUM(film.length) AS total_combined_film_length FROM actor act INNER JOIN film_actor film_actor ON act.actor_id=film_actor.actor_id INNER JOIN film film ON film_actor.film_id=film.film_id INNER JOIN film_category fc ON film.film_id=fc.film_id INNER JOIN category category ON fc.category_id=category.category_id WHERE category.name='animation' GROUP BY act.actor_id ASC ) AS animation ON actor.actor_id=animation.actor_id

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

ISBN: 1583474013, 978-1583474013

More Books

Students also viewed these Databases questions