User:Azertus/SPARQL
Resources
edit- Wikidata:SPARQL tutorial
- http://www.w3.org/TR/2013/REC-sparql11-query-20130321
- wikibooks:SPARQL (not read)
- Wikidata:SPARQL query service
Queries
edit- Temporary query to match the table at https://www.who.int/en/activities/tracking-SARS-CoV-2-variants/
- Try it!
SELECT ?variant_of_interest ?variant_of_interestLabel ?startTime ?name WHERE { SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } ?variant_of_interest wdt:P31 wd:Q107059450. OPTIONAL { ?variant_of_interest p:P31 _:b14. _:b14 pq:P580 ?startTime. ?variant_of_interest wdt:P1448 ?name. } } LIMIT 100
- family name dabs
# Description: Finds family name items that are linked to a dab using different from, # but which don't have the correct criterion. # QuickStatements: https://tools.wmflabs.org/quickstatements/#/batch/4287 SELECT ?item ?dab WHERE { ?item wdt:P31 wd:Q101352. ?item p:P1889 ?dabStatement. ?dabStatement ps:P1889 ?dab. MINUS {?dabStatement pq:P1013 wd:Q27924673} MINUS {?item wdt:P31 wd:Q777342} #?dabStatement pq:P1013 ?crit. # uncomment to find items with the *wrong* criterion ?dab wdt:P31 wd:Q4167410. } #LIMIT 10