SELECT node_id
FROM(
	SELECT 
		node_id,
		GROUP_CONCAT(
			CONCAT(setting_name,'###',COALESCE(junction_varchar,junction_decimal))
		) AS filter,
		:filter AS filter_in
	FROM cms_nodes
	JOIN cms_junctions ON junction_join_node_id = node_id
	JOIN cms_settings ON setting_node_id = junction_root_node_id
	GROUP BY node_id
) sub_filter
WHERE locate(filter_in,filter)