WITH spark AS (
	SELECT
		n."index" AS "id",
		n."text" AS "name",
		d."text" AS "description"
	FROM text_data n
		LEFT JOIN text_data d ON n."index" = d."index" AND d."category" = 172
	WHERE n.category = 147
)
SELECT
	sf.factor_id,
	spark.name,
	spark.description,
	sf.factor_group_id,
	sf.rarity,
	sf.factor_type
FROM spark
	JOIN succession_factor sf ON spark.id = sf.factor_id
WHERE sf.factor_type != 7 -- exclude Carnival Bonus
ORDER BY sf.factor_id
