query-6bb1b5be1d26d6c1f506cc5016f0b9dc
Recent publications
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q37860261>
SELECT
(MIN(?dates) AS ?date)
?work ?workLabel (CONCAT("#work/", SUBSTR(STR(?work), 32)) AS ?workUrl)
(GROUP_CONCAT(DISTINCT ?type_label; separator=", ") AS ?type)
(SAMPLE(?pages_) AS ?pages)
?venue ?venueLabel
(CONCAT("#venue/", SUBSTR(STR(?venue), 32)) AS ?venueUrl)
(GROUP_CONCAT(DISTINCT ?author_label; separator=", ") AS ?authors)
# (CONCAT("#authors/", GROUP_CONCAT(DISTINCT SUBSTR(STR(?author), 32); separator=",")) AS ?authorsUrl)
WHERE {
{
?work wdt:P50 target: ,
?author .
OPTIONAL {
?author rdfs:label ?author_label_ . FILTER (LANG(?author_label_) = 'en')
}
BIND(COALESCE(?author_label_, SUBSTR(STR(?author), 32)) AS ?author_label)
OPTIONAL { ?work wdt:P1104 ?pages_ }
}
UNION
{
?work wdt:P98 target: ,
?author .
OPTIONAL {
?author rdfs:label ?author_label_ . FILTER (LANG(?author_label_) = 'en')
}
BIND(CONCAT(COALESCE(?author_label_, SUBSTR(STR(?author), 32)), " (ed.)") AS ?author_label)
}
OPTIONAL { ?work wdt:P31 ?type_ . ?type_ rdfs:label ?type_label . FILTER (LANG(?type_label) = 'en') }
?work wdt:P577 ?datetimes .
BIND(xsd:date(?datetimes) AS ?dates)
OPTIONAL { ?work wdt:P1433 ?venue }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?work ?workLabel ?venue ?venueLabel
ORDER BY DESC(?date)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?author")
v8("?author_label"):::projected
v3("?author_label_")
v16("?authors")
v12("?date")
v10("?dates"):::projected
v9("?datetimes")
v14("?pages")
v7("?pages_"):::projected
v13("?type")
v8("?type_")
v2("?type_label"):::projected
v11("?venue"):::projected
v15("?venueUrl")
v4("?work"):::projected
v12("?workUrl")
c3([http://www.wikidata.org/entity/Q37860261]):::iri
c11(["bd:serviceParam"]):::iri
c13(["#91;AUTO_LANGUAGE#93;,en"]):::literal
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P98"--> c3
v4 --"wdt:P98"--> v5
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v3
end
bind0[/"concat(?author_label_substring(str(?author),'32^^xsd:integer'),' (ed.)')"/]
v3 --o bind0
v5 --o bind0
bind0 --as--o v8
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v4 --"wdt:P50"--> c3
v4 --"wdt:P50"--> v5
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v5 -."rdfs:label".-> v3
end
bind1[/"?author_label_substring(str(?author),'32^^xsd:integer')"/]
v3 --o bind1
v5 --o bind1
bind1 --as--o v8
subgraph optional2["(optional)"]
style optional2 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1104".-> v7
end
end
union0r <== or ==> union0l
end
subgraph optional3["(optional)"]
style optional3 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P31".-> v8
v8 --"rdfs:label"--> v2
end
v4 --"wdt:P577"--> v9
bind2[/"http://www.w3.org/2001/XMLSchema#date(?datetimes)"/]
v9 --o bind2
bind2 --as--o v10
subgraph optional4["(optional)"]
style optional4 fill:#bbf,stroke-dasharray: 5 5;
v4 -."wdt:P1433".-> v11
end
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c11 --"wikibase:language"--> c13
end
bind7[/"min(?dates)"/]
v10 --o bind7
bind7 --as--o v12
bind8[/"concat('#work/',substring(str(?work),'32^^xsd:integer'))"/]
v4 --o bind8
bind8 --as--o v12
bind9[/"?type_label"/]
v2 --o bind9
bind9 --as--o v13
bind10[/"sample(?pages_)"/]
v7 --o bind10
bind10 --as--o v14
bind11[/"concat('#venue/',substring(str(?venue),'32^^xsd:integer'))"/]
v11 --o bind11
bind11 --as--o v15
bind12[/"?author_label"/]
v8 --o bind12
bind12 --as--o v16