SELECT
i.idx,
i.value_per_item,
i.quantity,
i.description,

i.category_id,
category.parent_id,
category.name,
category.description,
category.color

FROM transaction_line_item i
LEFT JOIN transaction_category category
	ON category.id = i.category_id
WHERE i.transaction_id = ?
ORDER BY idx;