query-8e705e855dc55c7f536029c18ad971c9
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 schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?label ?labelgen ?sitelinks (COUNT(DISTINCT ?article) as ?lang_wiki_sitelinks) WHERE {
#
VALUES ?type {wd:Q571 wd:Q7725634 wd:Q47461344 }
?item wdt:P31 ?type .
?item wdt:P136 ?genre.
?genre rdfs:label ?labelgen filter (lang(?labelgen) = "it"). # <<<<<<<<<<<<<<<<<<<<<<<<
?item wdt:P577 ?date .
?item wdt:P50 ?author .
OPTIONAL {?author wdt:P1559 ?authorlabel . filter(lang(?authorlabel) = "en")}
OPTIONAL {?author rdfs:label ?authorlabel2 . filter(lang(?authorlabel2) = "en")}
FILTER (?date > "1979-01-01T00:00:00Z"^^xsd:dateTime) .
?item rdfs:label ?label filter (lang(?label) = "it")
?item wdt:P407 wd:Q652.
?article schema:about ?item ;
schema:isPartOf ?partof .
?partof wikibase:wikiGroup "wikipedia" .
?item wikibase:sitelinks ?sitelinks.
} group by ?item ?label ?labelgen ?sitelinks HAVING (?lang_wiki_sitelinks >1)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v11("?article"):::projected
v10("?author")
v6("?authorlabel")
v4("?authorlabel2")
v3("?date")
v9("?genre")
v8("?item"):::projected
v2("?label"):::projected
v5("?labelgen"):::projected
v14("?lang_wiki_sitelinks")
v12("?partof")
v13("?sitelinks"):::projected
v7("?type")
c12(["wd:Q652"]):::iri
c16(["wikipedia"]):::literal
f0[["?lang_wiki_sitelinks > '1^^xsd:integer'"]]
f0 --> v14
f1[["?label = 'it'"]]
f1 --> v2
f2[["?date > '1979-01-01T00:00:00Z^^xsd:dateTime'"]]
f2 --> v3
f3[["?labelgen = 'it'"]]
f3 --> v5
bind4[/VALUES ?type/]
bind4-->v7
bind40(["wd:Q571"])
bind40 --> bind4
bind41(["wd:Q7725634"])
bind41 --> bind4
bind42(["wd:Q47461344"])
bind42 --> bind4
v8 --"wdt:P31"--> v7
v8 --"wdt:P136"--> v9
v9 --"rdfs:label"--> v5
v8 --"wdt:P577"--> v3
v8 --"wdt:P50"--> v10
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v10 -."wdt:P1559".-> v6
end
subgraph optional1["(optional)"]
style optional1 fill:#bbf,stroke-dasharray: 5 5;
v10 -."rdfs:label".-> v4
end
v8 --"rdfs:label"--> v2
v8 --"wdt:P407"--> c12
v11 --"schema:about"--> v8
v11 --"schema:isPartOf"--> v12
v12 --"wikibase:wikiGroup"--> c16
v8 --"wikibase:sitelinks"--> v13
bind6[/"count(?article)"/]
v11 --o bind6
bind6 --as--o v14