Jheald added a comment. For example, here is a query <http://tinyurl.com/pql8ew7> to give break down the number of films by the number of values of cast member (https://phabricator.wikimedia.org/P161) that we have for them:
PREFIX wikibase: <http://wikiba.se/ontology#> PREFIX wd: <http://www.wikidata.org/entity/> PREFIX wdt: <http://www.wikidata.org/prop/direct/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?nvals (COUNT(DISTINCT(?item)) AS ?count) WHERE { { SELECT ?item (COUNT(DISTINCT(?value)) AS ?nvals) WHERE { ?item wdt:P31/wdt:P279* wd:Q11424 . ?item wdt:P161 ?value } GROUP BY ?item } } GROUP BY ?nvals ORDER BY ?nvals TASK DETAIL https://phabricator.wikimedia.org/T120166 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Jheald Cc: Jheald, daniel, Lydia_Pintscher, Aklapper, Christopher, StudiesWorld, jkroll, Smalyshev, Wikidata-bugs, Jdouglas, aude, Deskana, Manybubbles, JeroenDeDauw, Mbch331 _______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
