Utente:Galessandroni/Wikidata: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Etichetta: Editor wikitesto 2017
Improved codes
Etichetta: Editor wikitesto 2017
Riga 13:
OPTIONAL { ?position_statement pq:P582 ?x }
OPTIONAL { ?pres wdt:P18 ?picture }
bindBIND(ifIF(boundBOUND(?x), ?x, NOW()) as ?end )
bindBIND(floorFLOOR(?end - ?start) as ?days)
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "it" . }
} ORDER BY ?start
}
ORDER BY ?start
}}
 
Riga 24:
{{SPARQL|query=
#Presidenti del Consiglio della Repubblica italiana
 
SELECT ?pres ?presLabel ?start ?end ?days WHERE {
?pres wdt:P31 wd:Q5 .
 
?pres p:P39 ?position_held_statement .
?position_held_statement ps:P39 wd:Q796897 .
?position_held_statement pq:P580 ?start .
OPTIONAL { ?position_held_statement pq:P582 ?x . }
bindBIND(ifIF(boundBOUND(?x), ?x, NOW()) as ?end )
bindBIND(floorFLOOR(?end - ?start) as ?days)
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "it". }
 
} ORDER BY ?start
}}
Line 46 ⟶ 45:
#Beni architettonici con codice WLM nelle Marche con e senza immagine
#defaultView:Map
 
SELECT ?bene ?beneLabel ?wlmid ?coords ?img ?layer WHERE {
?bene wdt:P2186 ?wlmid;
Riga 53:
OPTIONAL { ?bene wdt:P18 ?img . }
BIND(IF(BOUND(?img), '', 'Cercasi immagine') AS ?layer)
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Line 62 ⟶ 63:
#Alberi monumentali con codice WLM nelle Marche con e senza immagine
#defaultView:Map
 
SELECT ?bene ?beneLabel ?wlmid ?coords ?img ?layer WHERE {
?bene wdt:P2186 ?wlmid;
Line 69 ⟶ 71:
OPTIONAL { ?bene wdt:P18 ?img . }
BIND(IF(BOUND(?img), '', 'Cercasi immagine') AS ?layer)
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
}
Line 77 ⟶ 80:
{{SPARQL|query=
# Scuole superiori della provincia di Pesaro e Urbino (Q16241)
 
SELECT ?item ?CodiceMeccanografico ?itemLabel ?indirizzo ?comune ?comuneLabel ?coords WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
?item wdt:P5114 ?CodiceMeccanografico.
FILTER(REGEX(?CodiceMeccanografico, "^.{2}[PQRST]"))
Line 85 ⟶ 88:
OPTIONAL { ?item wdt:P131 ?comune. }
OPTIONAL { ?item wdt:P625 ?coords. }
 
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE]". }
} ORDER BY (?comuneLabel) (?CodiceMeccanografico)
}}
 
Line 93 ⟶ 97:
{{SPARQL|query=
#Mappa delle biblioteche in Italia
# (Per essere presenti, le biblioteche, devono essere dotate di coordinate!)
#defaultView:Map
 
SELECT ?library ?libraryLabel ?coords WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". }
?library (wdt:P31/(wdt:P279*)) wd:Q7075;
wdt:P17 wd:Q38;
wdt:P625 ?coords.
 
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". }
}
}}