sql - MySQL - Movie Database Query including Null Rows -


References I'm working on the Sakila rental DVD database here mentioning them (# 2):

I am trying to find the sequence of all the science-fiction movies that have been performed in every actor, including those who have not been in a science fiction film. . I have a right query for what has been done in a science fiction movie, but I am having trouble adding all these actors even though the order is zero.

Here is my query:

  select act.first_name, act.last_name, SUM (fm.length) Join the movie FM from within film_actor father at fa.film_id = fm.film_id on fa.actor_id = act .actor_id Join Actor Act fm.film_id = fc.film_id on the left fc.category_id = cat.category_id on the left Category Bill Join the movie_category FC where 'science-fiction' group by cat.name = act.first_name, act.last_name order by act.last_name  

This gives me all the 167 actors who are the least 1 science-fiction is in the movie. I think my segment is not allowing zero rows, but I do not know how to fix it.

"itemprop =" text ">

You are right, working on the right side so far where the block meets your left. ..If it is empty then it is being filtered because zero is not equal to 'science-fi' tap? Where to tell the statement to include them

  Where (cat.name = 'science-fiction' or cat.name is empty)  

Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -