query-c083602fcf244b225b6830bb884a42e4
WSJ articles SELECT DISTINCT ?item ?itemLabel ?date ?articleId ?wordCount ?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. } OPTIONAL { ?item wdt:P6570 ?wordCount. } SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en". } }
Use at
- https://query.wikidata.org/sparql
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#>
# WSJ articles
SELECT DISTINCT ?item ?itemLabel ?date ?articleId ?wordCount ?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. }
OPTIONAL { ?item wdt:P6570 ?wordCount. }
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;
v3("?articleId"):::projected
v5("?date"):::projected
v1("?item"):::projected
v2("?publishedIn")
v4("?url"):::projected
v6("?wordCount"):::projected
a1((" "))
c12(["bd:serviceParam"]):::iri
c2(["wd:Q164746"]):::iri
c14(["fr,en"]):::literal
c5(["wd:Q191067"]):::iri
v1 --"p:direct/P1433"--> c2
v1 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c5
v1 --"p:P1433"--> v2
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v2 -."p:qualifier/P2322".-> v3
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P953".-> v4
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P577".-> v5
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v1 -."p:direct/P6570".-> v6
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
end