User:Epìdosis/Queries/Exp
< User:Epìdosis | Queries
SPARQL edit
Punti da trattare
- panoramica su interfaccia di https://query.wikidata.org/
- breve panoramica su guide varie alle query SPARQL
|
poi ...
ecc. |
Treccani (base) edit
SELECT ?item ?treccani
WHERE {
?item wdt:P3365 ?treccani .
}
Treccani (con etichette) edit
- SERVICE wikibase:label
SELECT ?item ?itemLabel ?treccani
WHERE {
?item wdt:P3365 ?treccani .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani (con etichette, ordinato) edit
- ORDER BY
- ORDER BY ASC
- ORDER BY DESC
SELECT ?item ?itemLabel ?treccani
WHERE {
?item wdt:P3365 ?treccani .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
ORDER BY DESC(?treccani)
Treccani (con etichette, limitato) edit
- LIMIT
SELECT ?item ?itemLabel ?treccani
WHERE {
?item wdt:P3365 ?treccani .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
LIMIT 1000
Treccani (persone italiane) edit
- più condizioni
SELECT ?person ?personLabel ?treccani
WHERE {
?person wdt:P3365 ?treccani .
?person wdt:P31 wd:Q5 .
?person wdt:P27 wd:Q38 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
LIMIT 1000
Treccani (persone non italiane) edit
- MINUS
SELECT ?person ?personLabel ?treccani
WHERE {
?person wdt:P3365 ?treccani .
?person wdt:P31 wd:Q5 .
MINUS { ?person wdt:P27 wd:Q38 . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani (persone dell'Italia unita) edit
- UNION
SELECT ?person ?personLabel ?nationLabel ?treccani
WHERE {
?person wdt:P3365 ?treccani .
?person wdt:P31 wd:Q5 .
{ ?person wdt:P27 wd:Q38 . } UNION { ?person wdt:P27 wd:Q172579 . }
?person wdt:P27 ?nation .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani + opz. EI (persone dell'Italia unita) edit
- OPTIONAL
SELECT ?person ?personLabel ?nationLabel ?treccani ?ei
WHERE {
?person wdt:P3365 ?treccani .
OPTIONAL { ?person wdt:P4223 ?ei . }
?person wdt:P31 wd:Q5 .
{ ?person wdt:P27 wd:Q38 . } UNION { ?person wdt:P27 wd:Q172579 . }
?person wdt:P27 ?nation .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani + opz. EI (persone dell'Italia unita nate in Toscana) edit
- ricorsivo (*)
SELECT ?person ?personLabel ?nationLabel ?birthplace ?birthplaceLabel ?treccani ?ei
WHERE {
?person wdt:P3365 ?treccani .
OPTIONAL { ?person wdt:P4223 ?ei . }
?person wdt:P31 wd:Q5 .
{ ?person wdt:P27 wd:Q38 . } UNION { ?person wdt:P27 wd:Q172579 . }
?person wdt:P27 ?nation .
?person wdt:P19 ?birthplace .
?birthplace wdt:P131* wd:Q1273 .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani + opz. EI (persone dell'Italia unita nate in Toscana su mappa) edit
SELECT ?person ?personLabel ?nationLabel ?birthplace ?birthplaceLabel ?coord ?treccani ?ei
WHERE {
?person wdt:P3365 ?treccani .
OPTIONAL { ?person wdt:P4223 ?ei . }
?person wdt:P31 wd:Q5 .
{ ?person wdt:P27 wd:Q38 . } UNION { ?person wdt:P27 wd:Q172579 . }
?person wdt:P27 ?nation .
?person wdt:P19 ?birthplace .
?birthplace wdt:P131* wd:Q1273 .
?birthplace wdt:P625 ?coord .
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Treccani + opz. EI e immagine (persone dell'Italia unita nate in Toscana con data di nascita) edit
SELECT ?person ?personLabel ?nationLabel ?birthplace ?birthplaceLabel ?birthdate ?image ?treccani ?ei
WHERE {
?person wdt:P3365 ?treccani .
OPTIONAL { ?person wdt:P4223 ?ei . }
?person wdt:P31 wd:Q5 .
{ ?person wdt:P27 wd:Q38 . } UNION { ?person wdt:P27 wd:Q172579 . }
?person wdt:P27 ?nation .
?person wdt:P19 ?birthplace .
?birthplace wdt:P131* wd:Q1273 .
?person wdt:P569 ?birthdate .
OPTIONAL { ?person wdt:P18 ?image . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" . }
}
Vecchio materiale edit
- Gadget fondamentali: Merge; labelLister; Move; AuthorityControl; ("Reasonator"); (Ancestors); DuplicateReferences; currentDate
- Risultato PHI Latin Texts author ID (P6941) (abbr. https://w.wiki/3Z8D, al risultato https://w.wiki/3Z8F):
#title:Autori latini presenti in almeno uno tra PHI Latin Texts, Musisque Deoque e DigilibLT
SELECT ?item ?it ?la
(GROUP_CONCAT(DISTINCT ?phi1; separator=", ") as ?phi)
(GROUP_CONCAT(DISTINCT ?digilib1; separator=", ") as ?digilib)
(GROUP_CONCAT(DISTINCT ?mqdq1; separator=", ") as ?mqdq)
(GROUP_CONCAT(DISTINCT ?dll1; separator=", ") as ?dll)
(GROUP_CONCAT(DISTINCT ?perseus1; separator=", ") as ?perseus)
(GROUP_CONCAT(DISTINCT ?corpuscorporum1; separator=", ") as ?corpuscorporum)
(GROUP_CONCAT(DISTINCT ?viaf1; separator=", ") as ?viaf)
(GROUP_CONCAT(DISTINCT ?isni1; separator=", ") as ?isni)
WHERE
{
{ ?item wdt:P6941 ?phi1 . } UNION { ?item wdt:P6862 ?digilib1 . } UNION { ?item wdt:P6999 ?mqdq1 . }
OPTIONAL { ?item wdt:P8122 ?dll1 . }
OPTIONAL { ?item wdt:P7041 ?perseus1 . }
OPTIONAL { ?item wdt:P7935 ?corpuscorporum1 . }
OPTIONAL { ?item wdt:P214 ?viaf1 . }
OPTIONAL { ?item wdt:P213 ?isni1 . }
?item rdfs:label ?it . FILTER(LANG(?it) = 'it') .
?item rdfs:label ?la . FILTER(LANG(?la) = 'la') .
}
GROUP BY ?item ?it ?la
ORDER BY ?it