query-f5b62ca9370d14023f88b2ebf10d9101
TODO
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 rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?label ?authorlabel (COUNT(?anotherItem) AS ?inbound_links) WHERE {
VALUES ?type {
wd:Q571
wd:Q7725634
}
?item wdt:P31 ?type;
wdt:P577 ?date;
wdt:P50 ?author.
?author wdt:P1559 ?authorlabel.
FILTER((LANG(?label)) = "en")
FILTER(?date > "1979-01-01T00:00:00Z"^^xsd:dateTime)
?item rdfs:label ?label.
FILTER((LANG(?label)) = "en")
?item wdt:P495 wd:Q38.
OPTIONAL {?anotherItem ?predicate ?item .
?property wikibase:directClaim ?predicate .}
}
GROUP BY ?item ?label ?authorlabel
ORDER BY DESC (?inbound_links)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?anotherItem"):::projected
v6("?author")
v7("?authorlabel"):::projected
v3("?date")
v11("?inbound_links")
v5("?item"):::projected
v2("?label"):::projected
v9("?predicate")
v10("?property")
v4("?type")
c9(["wd:Q38"]):::iri
f0[["?label = 'en'"]]
f0 --> v2
f1[["?date > '1979-01-01T00:00:00Z^^xsd:dateTime'"]]
f1 --> v3
f2[["?label = 'en'"]]
f2 --> v2
bind3[/VALUES ?type/]
bind3-->v4
bind30(["wd:Q571"])
bind30 --> bind3
bind31(["wd:Q7725634"])
bind31 --> bind3
v5 --"wdt:P31"--> v4
v5 --"wdt:P577"--> v3
v5 --"wdt:P50"--> v6
v6 --"wdt:P1559"--> v7
v5 --"rdfs:label"--> v2
v5 --"wdt:P495"--> c9
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v8 -->v9--> v5
v10 -."wikibase:directClaim".-> v9
end
bind5[/"count(?anotherItem)"/]
v8 --o bind5
bind5 --as--o v11