Wikidata:WikiProject Sled dog racing/Queries
Jump to navigation
Jump to search
SPARQL queries :
Mushers[edit]
All mushers[edit]
The following query uses these:
- Items: human (Q5) , dogsled musher (Q500097)
- Properties: instance of (P31) , occupation (P106)
SELECT DISTINCT ?musher ?musherLabel WHERE { ?musher wdt:P31 wd:Q5 . ?musher wdt:P106 wd:Q500097 . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } }
Gender[edit]
All mushers without gender[edit]
The following query uses these:
- Items: human (Q5) , dogsled musher (Q500097)
- Properties: instance of (P31) , occupation (P106) , sex or gender (P21)
SELECT DISTINCT ?musher ?musherLabel WHERE { ?musher wdt:P31 wd:Q5 . ?musher wdt:P106 wd:Q500097 . FILTER NOT EXISTS { ?musher wdt:P21 ?genre . } SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } }
Names[edit]
All mushers without a valid given name[edit]
The following query uses these:
- Properties: instance of (P31) , occupation (P106) , given name (P735) , subclass of (P279)
SELECT DISTINCT ?musher ?musherLabel WHERE { ?musher wdt:P31 wd:Q5 . ?musher wdt:P106 wd:Q500097 . FILTER NOT EXISTS { ?musher wdt:P735 ?prenom . ?prenom wdt:P31/wdt:P279* wd:Q202444 } SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } }
Mushers with a valid given name (with duplicates)[edit]
The following query uses these:
- Properties: instance of (P31) , occupation (P106) , given name (P735) , subclass of (P279)
SELECT DISTINCT ?musher ?musherLabel WHERE { ?musher wdt:P31 wd:Q5 . ?musher wdt:P106 wd:Q500097 . ?musher wdt:P735 ?prenom . ?prenom wdt:P31/wdt:P279* wd:Q202444 . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } }
Mushers with several given names[edit]
The following query uses these:
- Properties: instance of (P31) , occupation (P106) , given name (P735) , subclass of (P279)
SELECT DISTINCT ?musher ?musherLabel (COUNT(distinct ?prenom) as ?count_prenom) WHERE { ?musher wdt:P31 wd:Q5 . ?musher wdt:P106 wd:Q500097 . ?musher wdt:P735 ?prenom . ?prenom wdt:P31/wdt:P279* wd:Q202444 . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } } GROUP BY ?musher ?musherLabel HAVING (?count_prenom >1) ORDER BY DESC(?count_prenom)
Races[edit]
All races (?)[edit]
The following query uses these:
- Items: sled dog racing (Q1968664)
- Properties: instance of (P31) , subclass of (P279)
SELECT DISTINCT ?race ?raceLabel WHERE { ?race wdt:P31/wdt:P279* wd:Q1968664 . SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . } }