Skip to content
Advertisement

Get Name from characters that died on Episode3 with its killer

I have a doubt on this sql problem.

mysql

Here is the tables.

I currenly have all the characters names that died on Episode 3, but I don’t know how to get the character killers.

Any idea?

This is my sql query so far.

Advertisement

Answer

You can join the characters table twice:

Notes:

  • Use standard joins! Implicit joins (with commas in the from clause) are legacy syntax from (literaly) decades ago, that should not be used in new code

  • Use single quotes for literal strings; in standard SQL, double quotes stand for identifiers (although MySQL makes things differently)

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement