Query ready
SELECT a.name AS person, b.name AS teammateFROM users aJOIN users b ON a.department_id = b.department_id AND a.id < b.id;
Click any line to inspect its stage
Execution Board
01 · FROM
Scanning every tuple of the relation from working storage before filtering or projection.