simplifying named graphs query