SQL - Advanced Joins
Given the
categories table:id | name | parent_id ---+------------+---------- 1 | Electronics| NULL 2 | Computers | 1 3 | Laptops | 2 4 | Phones | 1What will the following query return?
SELECT c.name AS Category, p.name AS Parent FROM categories c LEFT JOIN categories p ON c.parent_id = p.id;
