User:Uomovariabile/Queries
Jump to navigation
Jump to search
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Try it!
Varie
[edit]Controlled vocabularies
[edit]People
[edit]WikiCite
[edit]Graphs
[edit]# Direttori Scuola di agricoltura di Portici
#defaultView:Graph
SELECT ?item ?itemLabel ?itemPicture ?occupation ?occupationLabel ?institution ?institutionLabel
WHERE
{
?item wdt:P108 wd:Q3953372.
?item wdt:P106 ?occupation.
OPTIONAL {?item wdt:P18 ?itemPicture .}
VALUES ?institution { wd:Q3953372 }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
- Pubblicati da un editore (very cute, I don't remember who do this)
- Autori delle edizioni pubblicate da Tor Books (modifica della precedente query, preferito)
#Autori delle edizioni pubblicate da Tor Books
#defaultView:Graph
SELECT ?publisher ?publisherLabel ?publisherPicture ?author ?authorLabel ?authorPicture
WHERE
{
?item wdt:P31 wd:Q3331189.
?item wdt:P123 wd:Q2647037 .
?item wdt:P123 ?publisher.
OPTIONAL {?publisher wdt:P154 ?publisherPicture.}
?item wdt:P50 ?author.
OPTIONAL {?item wdt:P18 ?itemPicture}
OPTIONAL {?author wdt:P18 ?authorPicture} .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?author
Maps
[edit]Map of places of residence of accused witches
Lists
[edit]- Lista delle proprietà riferibili a external-ID in ordine di identificativo proprietà
- Premi ricevuti da Ursula Le Guin
- Edizioni in italiano con autore/i ed editore ordinate per anno
- Taxon con iNaturalist, Plants of the world, NCBI
SELECT DISTINCT ?item ?itemLabel ?iNAT ?POW ?NCBI ?image
WHERE
{
?item wdt:P31 wd:Q16521.
?item wdt:P5037 ?POW.
?item wdt:P3151 ?iNAT.
?item wdt:P685 ?NCBI.
?item wdt:P18 ?image.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
LIMIT 20
# Item con ID autore Edit16 e senza id autore SBN
SELECT ?item ?itemLabel ?edit16ID ?SBNauthorID
WHERE
{
?item wdt:P5492 ?edit16ID.
OPTIONAL {?item wdt:P396 ?SBNauthorID. }
FILTER(!bound(?SBNauthorID))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?itemLabel
- Lista degli sviluppatori di free software ordinati per anno di nascita e con datore di lavoro quando presente
SELECT DISTINCT ?softwareLabel ?developerLabel ?yearofbirth ?employerLabel
WHERE {
?software wdt:P31 wd:Q341 .
?software wdt:P178 ?developer .
?developer wdt:P569 ?dateofbirth .
OPTIONAL {?developer wdt:P108 ?employer .}
BIND(YEAR(?dateofbirth) AS ?yearofbirth).
SERVICE wikibase:label {
bd:serviceParam wikibase:language "en" .
}
}
ORDER BY ?yearofbirth
- Biblioteche in Italia
#Libraries in Italy
#defaultView:Map
SELECT DISTINCT ?library ?libraryLabel ?coor ?image
WHERE
{
?library wdt:P31/wdt:P279* wd:Q7075 .
?library wdt:P17 wd:Q38 .
OPTIONAL { ?library wdt:P625 ?coor }
OPTIONAL { ?library wdt:P18 ?image }
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" }
}
ORDER BY ?libraryLabel
- Mappa dei luoghi di nascita degli autori di libri in Wikidata con SHARE id
#defaultView:Map
SELECT ?book ?bookLabel ?authorLabel ?SHAREid ?birthplaceLabel ?coord ?lat ?lon
WHERE {
?book wdt:P31 wd:Q571 .
?book wdt:P50 ?author .
?author wdt:P19 ?birthplace .
?author wdt:P3987 ?SHAREid .
OPTIONAL {?birthplace wdt:P625 ?coord. }
OPTIONAL {
?birthplace p:P625 ?statement.
?statement psv:P625 ?node.
?node wikibase:geoLatitude ?lat.
?node wikibase:geoLongitude ?lon.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 2000
- Own timeline
- Archeologi italiani con VIAF non in it.wiki
#Archeologi italiani con VIAF in Wikidata che non hanno voce in it.wiki
#occupation=archeologo
#paese di cittadinanza = Italia
#VIAF ID
# get DOB for ordering.
# look for articles (sitelinks) in italiano ("it")
# but select items with no such article
PREFIX schema: <http://schema.org/>
SELECT ?item ?itemLabel ?dob WHERE {
?item wdt:P106 wd:Q3621491.
?item wdt:P27 wd:Q38.
?item wdt:P214 ?VIAF_ID.
OPTIONAL { ?item wdt:P569 ?dob. }
OPTIONAL {
?sitelink schema:about ?item.
?sitelink schema:inLanguage "it".
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en". }
FILTER(!BOUND(?sitelink))
}
ORDER BY ?dob
LIMIT 4999
- Economisti italiani con VIAF ID che non hanno voce in it.wiki
- Dipinti nelle collezioni del Louvre che rappresentano un faro
#defaultView:ImageGrid
SELECT ?item ?itemLabel ?object ?objectLabel ?image
WHERE
{
?item wdt:P31/wdt:P279* wd:Q3305213 .
?item wdt:P180 ?object .
?collection wdt:P195 wd:Q19675 .
?object wdt:P279* wd:Q39715 .
?item wdt:P18 ?image .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
Journals and papers
[edit]- AIB Studi vol. 61
- Autori di AIB Studi senza identificativi
- Riviste con ACNPid e lingua con OPTIONAL reference URL (P854) filtrate per stated in (P248) assente [1]
# Articoli pubblicati nel vol. 53 di Cataloging & Classification Quarterly con autore come stringa
SELECT ?item ?itemLabel ?authorstring ?vol
WHERE
{
?item wdt:P1433 wd:Q5051313 . # Pubblicato in Cataloging & Classification Quarterly
?item wdt:P478 ?vol .
FILTER(?vol ="53")
?item wdt:P2093 ?authorstring.
?item wdt:P577 ?pubdate .
MINUS {?item wdt:P50 ?author.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?item
- Esempio p: ps: pr: su Affari sociali internazionali (Q27718342)
#...
SELECT ?item ?langLabel ?ACNPid ?ref ?ref2Label
WHERE
{
wd:Q27718342 p:P407 ?statement;
p:P6981 ?statement2.
wd:Q27718342 rdfs:label ?item.
FILTER (LANG(?item) = "it").
?statement ps:P407 ?lang.
?statement2 ps:P6981 ?ACNPid.
?statement prov:wasDerivedFrom ?refnode.
OPTIONAL {?refnode pr:P854 ?ref. }
OPTIONAL {?refnode pr:P248 ?ref2.}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
- Conteggio journals
#Conteggio scientific journals
SELECT (COUNT(DISTINCT ?journal) AS ?scientificjournal)
WHERE
{
?journal wdt:P31/wdt:P279* wd:Q685935 . #istanza di/sottoclasse di pubblicazione periodica specializzata
}
- Riviste con ISSN (opzionale ACNP) ma senza indicazione lingua
- Riviste con ISSN (opzionale ACNP) senza language of work or name (P407) title (P1476) country of origin (P495)
- Riviste con ISSN (opzionale ACNP), language of work or name (P407) Italian (Q652), senza country of origin (P495)
- Riviste con ISSN senza title (P1476) e language of work or name (P407) (limita a 100)
- Articoli published in (P1433) un journal con author name string (P2093) uguale a un valore specifico
- Riviste in Wikidata con Property:P4616 (UniProt journal ID)
- Articoli in Wikidata da Arxiv con classificazione cs.DL
#Articoli con classificazione Arxiv (P820) uguale a '''cs.DL'''
SELECT ?item ?itemLabel ?value ?valueLabel
{
?item wdt:P820 ?value .
FILTER (?value ="cs.DL")
SERVICE wikibase:label { bd:serviceParam wikibase:language "it,en" }
}
LIMIT 1000
- Articoli con argomento Wikidata
- Mostra articoli e DOI pubblicati in The Journal of Molecular Diagnostics
- Articoli di JLIS
- Articoli di JLIS con author (P50) e author name string (P2093)
- Lista delle riviste scientifiche con Openedition Journal ID e senza Mirabel Journal ID
SELECT ?journal ?journalLabel ?openeditionID ?mirabelID
WHERE
{
?journal wdt:P31 wd:Q5633421 .
?journal wdt:P4741 ?openeditionID .
OPTIONAL {?journal wdt:P4730 ?mirabelID . }
FILTER(!bound(?mirabelID))
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Useful examples
[edit]- User:Geertivp/training
- Wikidata:SPARQL query service/queries
- Wikidata:SPARQL query service/queries/examples
SPARQL endpoints
[edit]Wikidata status reports
[edit]Stuff for librarians
[edit]Check for...
[edit]- Articoli inseriti per una specifica rivista e anno
- Romanzi con protagonista Maigret