query-8480966cc30b0f179514f64277809171

rq turtle/ttl

Lost itemsSee also: Wikidata:WikiProject Tennis/reports/P31 missing Wikidata:WikiProject Tennis/reports/P641 only

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?year ?st ?sl WHERE {
  ?item wdt:P641 wd:Q847; wikibase:statements ?st; wikibase:sitelinks ?sl .
  OPTIONAL { ?item rdfs:label ?l }
  MINUS { ?item wdt:P31|wdt:P279 [] }
  BIND(xsd:integer(REPLACE(STR(?l), '^.*((20[01]|1[98]\\d)\\d).*$', '$1')) AS ?year) .
  SERVICE wikibase:label { bd:serviceParam wikibase:language '[AUTO_LANGUAGE],en,it,es,de,fr' }
} ORDER BY DESC(xsd:integer(STRAFTER(STR(?item), 'Q')))

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?item"):::projected v4("?l") v3("?sl"):::projected v2("?st"):::projected v5("?year"):::projected a1((" ")) c10(["bd:serviceParam"]):::iri c3(["wd:Q847"]):::iri c12(["#91;AUTO_LANGUAGE#93;,en,it,es,de,fr"]):::literal v1 --"wdt:P641"--> c3 v1 --"wikibase:statements"--> v2 v1 --"wikibase:sitelinks"--> v3 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."rdfs:label".-> v4 end subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P279"--> a1 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P31"--> a1 end union0r <== or ==> union0l end end bind1[/"http://www.w3.org/2001/XMLSchema#integer(replace(str(?l),'^.*((20#91;01#93;|1#91;98#93;\d)\d).*$','$1'))"/] v4 --o bind1 bind1 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c10 --"wikibase:language"--> c12 end