01 / 05
Some rows disappear in a join
A JOIN returns only the rows where the key matched. So a member who has never ordered drops out of the result.
Take the names out with no repeats below and only four appear. members holds five, and Nonoka is not there.
SELECT DISTINCT members.name FROM members JOIN orders ON members.id = orders.member_id ORDER BY members.name;Result
Itsuki Kaede Minato Suzuna