Distinct(Project(OrderBy(Graph(?g, BGP( ?s ?p ?o)), (?g)), {?g}))