Each Category and Its Parent
EasyDescription
Categories form a tree: parent_category_id points to another row of categories. For
every category, show category_name and parent_name: the name of its parent category, or
(top level) when it has no parent.
End your query with ORDER BY category_id.
Tables
| categories |
|---|
| category_id (PK) |
| category_name |
| parent_category_id (FK) |