SELECT * FROM component c INNER JOIN componenttype ct ON ct.id = c.componenttype_id ORDER BY c.serial, ct.name