query: SELECT (strafter(str(?property),"y/") as ?p) ("" as ?list)  ?property (strafter(str(?property2),"y/") as ?p2) (COUNT(?s) as ?ct) (SAMPLE(?s) as ?item) WHERE { hint:Query hint:optimizer "None". ?s wdt:P641 wd:Q847 ; wikibase:statements 3 ; ?wdt [] ; ?wdt2 [] . ?property wikibase:claim ?wdt . ?property2 wikibase:claim ?wdt2 . FILTER ( ( ?wdt = p:P31 && ?wdt2 = p:P279 ) \u007C\u007C ( ?wdt != p:P641 && ?wdt2 != p:P641 && ?wdt != ?wdt2 && ?wdt2 != p:P279 && ?wdt2 != p:P31 && ( ?wdt = p:P31 \u007C\u007C ?wdt = p:P279 \u007C\u007C str(?wdt) < str(?wdt2) ) ) ) } GROUP BY ?property ?property2 ORDER BY DESC(?property = wd:P31) DESC(?property = wd:P279) DESC(?ct)