query-f245c6c3075d1b2ff04879159ab73479
All items by a specific author (more complete)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel ?itemDescription ( COUNT ( DISTINCT ?wikisource ) as ?wikisourceFullWork ) ( COUNT ( DISTINCT ?iaID ) as ?iaDownloads ) ( COUNT ( DISTINCT ?download ) as ?otherDownloads )
WHERE
{
{ SELECT DISTINCT ?item
WHERE
{
VALUES ?languages { "en" "es" }.
?item ( wdt:P170 | wdt:P50 | wdt:P57 | wdt:P58 | wdt:P84 | wdt:P86 | wdt:P87 | wdt:P110 | wdt:P676 | wdt:P943 ) wd:Q734054 .
?item rdfs:label ?itemLabel .
FILTER ( lang ( ?itemLabel ) = ?languages ) .
MINUS {
VALUES ?typeOfItem { wd:Q3658341 wd:Q187931 wd:Q3375722 }
?item wdt:P31 ?typeOfItem . }
}
}
OPTIONAL { ?item wdt:P724 ?iaID . }
OPTIONAL { ?item wdt:P953 ?download . }
OPTIONAL {
?wikisource schema:about ?item .
?wikisource schema:isPartOf <https://en.wikisource.org/> . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en, es" . }
}
GROUP BY ?item ?itemLabel ?itemDescription
ORDER BY ASC ( ?itemLabel )
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?download"):::projected
v9("?iaDownloads")
v5("?iaID"):::projected
v3("?item"):::projected
v1("?itemLabel"):::projected
v3("?languages")
v10("?otherDownloads")
v4("?typeOfItem")
v7("?wikisource"):::projected
v8("?wikisourceFullWork")
c2(["wd:Q734054"]):::iri
c20(["bd:serviceParam"]):::iri
c22(["en, es"]):::literal
c18([https://en.wikisource.org/]):::iri
f0[["?itemLabel = ?languages"]]
f0 --> v1
f0 --> v3
bind1[/VALUES ?languages/]
bind1-->v3
bind10(["en"])
bind10 --> bind1
bind11(["es"])
bind11 --> bind1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
subgraph union1[" Union "]
subgraph union1l[" "]
style union1l fill:#abf,stroke-dasharray: 3 3;
subgraph union2[" Union "]
subgraph union2l[" "]
style union2l fill:#abf,stroke-dasharray: 3 3;
subgraph union3[" Union "]
subgraph union3l[" "]
style union3l fill:#abf,stroke-dasharray: 3 3;
subgraph union4[" Union "]
subgraph union4l[" "]
style union4l fill:#abf,stroke-dasharray: 3 3;
subgraph union5[" Union "]
subgraph union5l[" "]
style union5l fill:#abf,stroke-dasharray: 3 3;
subgraph union6[" Union "]
subgraph union6l[" "]
style union6l fill:#abf,stroke-dasharray: 3 3;
subgraph union7[" Union "]
subgraph union7l[" "]
style union7l fill:#abf,stroke-dasharray: 3 3;
subgraph union8[" Union "]
subgraph union8l[" "]
style union8l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P943"--> c2
end
subgraph union8r[" "]
style union8r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P676"--> c2
end
union8r <== or ==> union8l
end
end
subgraph union7r[" "]
style union7r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P110"--> c2
end
union7r <== or ==> union7l
end
end
subgraph union6r[" "]
style union6r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P87"--> c2
end
union6r <== or ==> union6l
end
end
subgraph union5r[" "]
style union5r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P86"--> c2
end
union5r <== or ==> union5l
end
end
subgraph union4r[" "]
style union4r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P84"--> c2
end
union4r <== or ==> union4l
end
end
subgraph union3r[" "]
style union3r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P58"--> c2
end
union3r <== or ==> union3l
end
end
subgraph union2r[" "]
style union2r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P57"--> c2
end
union2r <== or ==> union2l
end
end
subgraph union1r[" "]
style union1r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P50"--> c2
end
union1r <== or ==> union1l
end
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P170"--> c2
end
union0r <== or ==> union0l
end
v3 --"rdfs:label"--> v1
subgraph minus2["MINUS"]
style minus2 stroke-width:6px,fill:pink,stroke:red;
bind3[/VALUES ?typeOfItem/]
bind3-->v4
bind30(["wd:Q3658341"])
bind30 --> bind3
bind31(["wd:Q187931"])
bind31 --> bind3
bind32(["wd:Q3375722"])
bind32 --> bind3
v3 --"wdt:P31"--> v4
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P724".-> v5
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v3 -."wdt:P953".-> v6
end
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v7 -."schema:about".-> v3
v7 --"schema:isPartOf"--> c18
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c20 --"wikibase:language"--> c22
end
bind7[/"count(?wikisource)"/]
v7 --o bind7
bind7 --as--o v8
bind8[/"count(?iaID)"/]
v5 --o bind8
bind8 --as--o v9
bind9[/"count(?download)"/]
v6 --o bind9
bind9 --as--o v10