query-badfaaf2025f08c3859619fab2e00da0

rq turtle/ttl

maintenance query: WSJ articles without unique article ID (should be empty) SELECT DISTINCT ?item ?itemLabel ?date ?articleId ?url WHERE {
?item wdt:P1433 wd:Q164746. hint:Prior hint:runFirst "true"^^xsd:boolean. ?item (wdt:P31/(wdt:P279*)) wd:Q191067; p:P1433 ?publishedIn. OPTIONAL { ?publishedIn pq:P2322 ?articleId. } OPTIONAL { ?item wdt:P953 ?url. } OPTIONAL { ?item wdt:P577 ?date. }

FILTER(?date >= "1996-03-01T00:00:00"^^xsd:dateTime) FILTER(!BOUND(?articleId)) SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". } }

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
# maintenance query: WSJ articles without unique article ID (should be empty)
SELECT DISTINCT ?item ?itemLabel ?date ?articleId ?url WHERE {  
  ?item wdt:P1433 wd:Q164746.

  ?item (wdt:P31/(wdt:P279*)) wd:Q191067;
    p:P1433 ?publishedIn.
  OPTIONAL { ?publishedIn pq:P2322 ?articleId. }
  OPTIONAL { ?item wdt:P953 ?url. }
  OPTIONAL { ?item wdt:P577 ?date. }

  FILTER(?date >= "1996-03-01T00:00:00"^^xsd:dateTime)
  FILTER(!BOUND(?articleId))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?articleId"):::projected v2("?date"):::projected v3("?item"):::projected v4("?publishedIn") v5("?url"):::projected a1((" ")) c12(["bd:serviceParam"]):::iri c3(["wd:Q164746"]):::iri c14(["fr,en"]):::literal c6(["wd:Q191067"]):::iri f0[["not bound(?articleId)"]] f0 --> v1 f1[["?date >= '1996-03-01T00:00:00^^xsd:dateTime'"]] f1 --> v2 v3 --"p:direct/P1433"--> c3 v3 --"p:direct/P31"--> a1 a1 --"p:direct/P279"--> c6 v3 --"p:P1433"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v4 -."p:qualifier/P2322".-> v1 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P953".-> v5 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v3 -."p:direct/P577".-> v2 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end