FabC
This user is a member of
WikiProject Informatics.
This user is a member of
WikiProject Space
.
Flag of ItalyThis user is a member of
WikiProject Italy.
This user is penguin powered.
This user has a page on Wikipedia.
Babel user information
en-3 This user has advanced knowledge of English.
it-N Questo utente può contribuire con un livello madrelingua in italiano.
Users by language

Wikiprojects

edit

Wikiproject:informatics

edit

WikiProject Informatics/Operating System

edit

https://www.wikidata.org/wiki/Wikidata:WikiProject_Informatics/Operating_System

Queries

edit

Find all "independent" GNU/Linux distributions, i.e. not based on another OS

# Find all GNU/Linux distributions that are independent, i.e. not based on another OS.
SELECT ?sistema_operativo ?sistema_operativoLabel WHERE {
  
  ?sistema_operativo wdt:P31/wdt:P279* wd:Q131669.        # Instances of subclass of "Linux distribution"
    OPTIONAL { ?sistema_operativo wdt:P144 ?w } # Filter out all those that have the "based on" (P144) property
    FILTER (!bound(?w))
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY (?sistema_operativoLabel)
Try it!


#Find all dead (i.e. not supported anymore) GNU/Linux distributions
SELECT ?item ?itemLabel
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q131669.
  ?item p:P2669 ?statement.
  ?statement rdf:type wdno:P2669. # This seems to be redundant...
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

The discontinuation date (P2669) could be a date (if known) or a novalue.


Operating systems developed by Microsoft

SELECT DISTINCT ?os
  (SAMPLE(COALESCE(?en_label, ?any_label)) as ?label)
  (SAMPLE(?based_on_label) as ?based_on)
  (SAMPLE(?logo) as ?logo)
  (SAMPLE(?image) as ?image)
  (GROUP_CONCAT(DISTINCT ?packaging_system_label ; separator=", ") as ?packaging_system)
  (GROUP_CONCAT(DISTINCT ?developer_label ; separator=", ") as ?developer)
  (GROUP_CONCAT(DISTINCT ?license_label ; separator=", ") as ?license)
  (SAMPLE(?inception) as ?inception)
  (GROUP_CONCAT(DISTINCT ?origin_label ; separator=", ") as ?origin)
  #(SAMPLE(?website) as ?website)
WHERE {
  ?os wdt:P31 wd:Q9135.
  OPTIONAL{?os rdfs:label ?en_label. FILTER(LANG(?en_label) = "en")} OPTIONAL {?os rdfs:label ?any_label}
  OPTIONAL{?os wdt:P144 ?based_on. ?based_on rdfs:label ?based_on_label. FILTER(LANG(?based_on_label) = "en")}
  OPTIONAL{?os wdt:P154 ?logo}
  OPTIONAL{?os wdt:P18 ?image}
  OPTIONAL{?os wdt:P3033 ?packaging_system. ?packaging_system rdfs:label ?packaging_system_label. FILTER(LANG(?packaging_system_label) = "en")}
  OPTIONAL{?os wdt:P275 ?license. ?license rdfs:label ?license_label. FILTER(LANG(?license_label) = "en")}
  OPTIONAL{?os wdt:P178 ?developer. 
           ?developer rdfs:label ?developer_label. 
           FILTER(LANG(?developer_label) = "en").       
          }
  OPTIONAL{?os wdt:P571 ?inception}
  OPTIONAL{?os wdt:P495 ?origin. ?origin rdfs:label ?origin_label. FILTER(LANG(?origin_label) = "en")}
  OPTIONAL{?os wdt:P856 ?website}
  FILTER(SUBSTR(str(?developer_label), 1, 9) = "Microsoft").
}
GROUP BY ?os ORDER BY ?label
Try it!

List of the licenses that are subclasses or instances of free software license (Q3943414)

# Free software and license
SELECT ?freesw ?freeswLabel ?freelicense ?freelicenseLabel WHERE {
  ?freelicense (wdt:P31/wdt:P279*) wd:Q3943414.      # Instances of free software licenses
  ?freesw wdt:P275 ?freelicense.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?freelicenseLabel
Try it!

Derived Linux Distribution

#Distribuzioni Linux derivate
SELECT ?item ?itemLabel ?basedon ?basedonLabel
WHERE 
{
  ?item wdt:P31 wd:Q20983788.
  ?item wdt:P144 ?basedon.

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". }
}
ORDER BY (?basedonLabel)
Try it!

Counts of derived Linux distribution

#Statistica Linux derivate
#defaultView:BubbleChart
SELECT DISTINCT ?basedonLabel (COUNT (?item) as $count) 
WHERE 
{
  ?item wdt:P31 wd:Q20983788.
  ?item wdt:P144 ?basedon.

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,it". }
}
GROUP BY ?basedon ?basedonLabel
ORDER BY DESC (?count)
Try it!

Astronautica

edit

Elenco degli astronauti italiani in ordine di tempo di permanenza nello spazio

edit
#Astronauti italiani in ordine di tempo di permanenza nello spazio
SELECT ?item ?itemLabel ?timeinspace ?unitLabel ?wikiarticle 
WHERE {
  ?item wdt:P106 wd:Q11631.                  # Astronuati
  ?item wdt:P31 wd:Q5.                       # umani (i.e. non di fantasia)
  ?item wdt:P27 wd:Q38.                      # Nazionalità italiana
  
  OPTIONAL { ?item wdt:P2873 ?timeinspace }  # Tempo nello spazio
  OPTIONAL { ?item p:P2873/psv:P2873 [       # Unità di tempo
            wikibase:quantityUnit ?unit 
            ]
  }
  FILTER (?timeinspace > 0).
  OPTIONAL {                                 # Articolo su Wikipedia
      ?wikiarticle schema:about ?item .
      ?wikiarticle schema:inLanguage "en" .
      FILTER (SUBSTR(str(?wikiarticle), 1, 25) = "https://en.wikipedia.org/")
    }
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC (?timeinspace)
Try it!

Elenco delle industrie aerospaziali italiane

edit
#Industrie aerospaziali italiane
SELECT ?industria_aerospaziale ?industria_aerospazialeLabel ?placeLabel
WHERE 
{
  {
    ?industria_aerospaziale wdt:P31 wd:Q936518. # Istanze di industrie aerospaziali
  } UNION
  {
    ?industria_aerospaziale wdt:P31 wd:Q4830453. # Istanza di impresa
    ?industria_aerospaziale wdt:P452 wd:Q936518. # settore di attività industria aereospaziale 
  }
  ?industria_aerospaziale wdt:P17 wd:Q38.        # Italiane

  OPTIONAL { ?industria_aerospaziale wdt:P159 ?place }  # Sede legale
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
order by ?industria_aerospazialeLabel
Try it!

Durata dell'attracco delle capsule SpaceX alla ISS

edit
SELECT ?istanza_di 
      ?istanza_diLabel 
      ?data_di_lancio_del_veicolo_spaziale 
      ?data_di_atterraggio_del_veicolo_spaziale 
      ?elapseddays
WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?istanza_di wdt:P361 wd:Q245653.
  ?istanza_di wdt:P137 wd:Q193701.
  OPTIONAL { ?istanza_di wdt:P619 ?data_di_lancio_del_veicolo_spaziale. }
  OPTIONAL { ?istanza_di wdt:P620 ?data_di_atterraggio_del_veicolo_spaziale. }
  BIND(?data_di_atterraggio_del_veicolo_spaziale - ?data_di_lancio_del_veicolo_spaziale AS ?elapseddays).
}
ORDER BY ASC(?data_di_lancio_del_veicolo_spaziale)
LIMIT 100
Try it!

Durate delle missioni CRS usando le date negli eventi chiave (Example only! do not use!)

edit
#Cronologia dei voli Commercial Resupply Services

SELECT ?itemLabel ?launchdate ?landingdate
WHERE
{
  ?item wdt:P31 wd:Q5916 .        #istanza di Volo Spaziale
  ?item wdt:P361 wd:Q245653 .     #parte di Commercial Resupply Services (CRS)
  
  OPTIONAL {
  ?item p:P793 [                  #riferimento alla dichiarazione evento chiave
           ps:P793 wd:Q797476;    #seleziona l'evento del lancio del razzo
           pq:P585 ?launchdate    #estrae il qualificatore con la data dell'evento di lancio
          ].
  }
  
  OPTIONAL {      
  ?item  p:P793 [                  #riferimento alla dichiarazione evento chiave
           ps:P793 wd:Q844947;     #seleziona l'evento dell'atterraggio
           pq:P585 ?landingdate    #estrae il qualificatore con la data dell'evento dell'atterraggio
          ].
  }

  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ORDER BY ?launchdate
Try it!

ISS assembly timeline

edit
#ISS assembly
#defaultView:Timeline
SELECT ?item ?itemLabel ?startdate ?picture
WHERE 
{
  ?item wdt:P31 wd:Q18812508 .   # Instance of a space module 
  ?item wdt:P361* wd:Q25271 .    # Parts of ISS
  OPTIONAL { ?item wdt:P18 ?picture .}            # Get a picture
  OPTIONAL { ?item p:P361 [pq:P580 ?startdate] .} # Get the date the module became (or will become) part of the ISS
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?startdate
Try it!

History of the launches of the Soyuz program

edit
#History of the launches of the Soyuz program
SELECT DISTINCT ?item ?itemLabel ?launchdate ?launchsiteLabel
WHERE 
{
  ?item wdt:P31/wdt:P279* wd:Q5916.          # Instance of any subclass of spaceflight
  ?item wdt:P361 wd:Q207329.                 # Part of the soyuz program
  OPTIONAL {
    ?item p:P793 [ ps:P793 wd:Q797476;       # Key events > rocket launch
                   pq:P585 ?launchdate       # "date" qualifier
                 ].
   }

  OPTIONAL {
    ?item p:P793 [ ps:P793 wd:Q797476;       # Key events > rocket launch
                   pq:P276 ?launchsite       # "date" qualifier
                 ].
   }  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?launchdate
Try it!

Flying time to the ISS

edit
#Tempo di arrivo sulla ISS

SELECT ?item ?itemLabel ?launchdate ?dockdate ?flyingtime
WHERE
{
  ?item wdt:P31 wd:Q752783 .        #istanza di Volo Spaziale
  
  # Select the vehicles docked to the ISS
  ?item  p:P793 [                  #riferimento alla dichiarazione "evento chiave"
           ps:P793 wd:Q557450 ;    #seleziona l'evento del docking
           pq:P276 wd:Q25271       #luogo = ISS
          ].

  # Launch date  
  OPTIONAL {
  ?item p:P793 [                  #riferimento alla dichiarazione "evento chiave"
           ps:P793 wd:Q797476;    #seleziona l'evento del "lancio del razzo vettore"
           pq:P585 ?launchdate    #estrae il qualificatore con la "data" dell'evento di lancio
          ].
  }
    
  # Docking date
  OPTIONAL {
  ?item  p:P793 [                  #riferimento alla dichiarazione "evento chiave"
           ps:P793 wd:Q557450 ;    #seleziona l'evento del docking
           pq:P580 ?dockdate       #data di inizio del docking, i.e. dell'arrivo sulla ISS
          ].
  }
  
  BIND(?dockdate-?launchdate AS ?flyingtime)
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ORDER BY ?launchdate
Try it!

Composizione della ISS

edit

Albero del prodotto della Stazione Spaziale Internazionale

# Product Tree of the ISS
#defaultView:Tree
SELECT
  ?class1 ?class1Label
  ?class2 ?class2Label
  ?class3 ?class3Label
  ?class4 ?class4Label
  ?class5 ?class5Label
WHERE
{
  VALUES ?class1 { wd:Q25271 }
  ?class1 ^wdt:P361 ?class2 .
  OPTIONAL { ?class2 ^wdt:P361 ?class3 .
    OPTIONAL { ?class3 ^wdt:P361 ?class4 .
      OPTIONAL { ?class4 ^wdt:P361 ?class5 . }
    }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO LANGUAGE],en" . }
}
Try it!

Missioni cubesats

edit
#Cubesat missions
SELECT ?item ?itemLabel  ?countryLabel ?launchdate ?launchvehicleLabel ?sponsorLabel
WHERE 
{
  ?item wdt:P31 wd:Q1142930.
  OPTIONAL {?item wdt:P619 ?launchdate}
  OPTIONAL {?item wdt:P495 ?country}
  OPTIONAL {?item wdt:P375 ?launchvehicle}
  OPTIONAL {?item wdt:P859 ?sponsor}
  
  # Special case for "unknown value" for "launch vehicle"
  BIND(IF(wikibase:isSomeValue(?launchvehicle),"Unknown",?launchvehicleLabel) AS ?launchvehicleLabel )
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,mul". }
}
ORDER BY DESC (?launchdate)
Try it!

Tabernacle

Missioni dello Space Shuttle

edit
# Space Shuttle missions
SELECT ?item ?itemLabel ?launchdate
WHERE 
{
  ?item wdt:P31 wd:Q752783.     # Instance of human spaceflight
  ?item wdt:P361 wd:Q1775296.   # Part of the Space Shutlle program
  ?item wdt:P619 ?launchdate.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
ORDER BY ?launchdate
Try it!

Satelliti artificiali italiani

edit
# Italian artificial satellites
SELECT DISTINCT ?item ?itemLabel ?cospar ?perigeo ?apogeo ?launchdate ?inclin ?period
WHERE   
{
  ?item p:P31/ps:P31/wdt:P279* wd:Q26540  . # Istanza di satellite per radioamatori
  ?item wdt:P495 wd:Q38   
  OPTIONAL {?item wdt:P247 ?cospar. }
  OPTIONAL {?item wdt:P377 ?scn. }  
  OPTIONAL {?item wdt:P619 ?launchdate. }   

  OPTIONAL {?item wdt:P2243 ?apogeo. }   
  OPTIONAL {?item wdt:P2244 ?perigeo. }   
  OPTIONAL {?item wdt:P2045 ?inclin. }    
  
  OPTIONAL {?item wdt:P2146 ?period. }   
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en ". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
ORDER BY ?launchdate
Try it!

Wikiproject:Italy

edit

Wikidata:Wikiproject Italy

Sottoprogetto Divisioni Amministrative italiane e Sandbox per la descrizione e accesso ai dati delle divisioni amministrative

Scientific publications

edit

All the scholarly articles (pubblicazioni scientifiche) with a short name of an author

edit
#Author name strings
SELECT ?item ?identificativo_DOI ?titolo WHERE {
  ?item wdt:P2093 "John Doe".
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  ?item wdt:P31 wd:Q13442814.
  OPTIONAL { ?item wdt:P356 ?identificativo_DOI. }
  OPTIONAL { ?item wdt:P1476 ?titolo. }
}
Try it!

All scholarly articles (articoli scientifici) with a keyword

edit
SELECT ?Articolo ?ArticoloLabel WHERE {
  ?Articolo wdt:P31 wd:Q13442814.       # Scholarly articles
  ?Articolo rdfs:label ?ArticoloLabel.  # Get label   
  ?Articolo wdt:P921 wd:Q48655.         # With microgravity keyword
  FILTER((LANG(?ArticoloLabel)) = "en").
}
LIMIT 100
Try it!


General queries

edit

Proprietà comuni di più items

edit

Questa interrogazione è utile per definire uno schema partendo da un set di item selezionati con una query.

SELECT ?property ?propertyLabel (COUNT(?item) AS ?count) WHERE {
  # Cambia Q26540 (Satellite artificiale) con la classe o la selezione che preferisci
  ?item wdt:P31/wdt:P279* wd:Q26540 . 
  
  # Estrae tutte le proprietà presenti su quegli item
  ?item ?p ?value .
  
  # Collega l'URI della proprietà al suo elemento Property
  FILTER(STRSTARTS(STR(?p), "http://www.wikidata.org/prop/direct/"))
  BIND(IRI(REPLACE(STR(?p), "http://www.wikidata.org/prop/direct/", "http://www.wikidata.org/entity/")) AS ?property)
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en". }
}
GROUP BY ?property ?propertyLabel
ORDER BY DESC(?count)
LIMIT 50
Try it!

Books and ISBN

edit
#Books in italian language - ISBN
SELECT ?book ?bookLabel ?ISBN
WHERE 
{
  ?book wdt:P31 wd:Q47461344.  # Opera scritta
  ?book wdt:P212 ?ISBN.
  ?book wdt:P407 wd:Q652.      # Italian language
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
LIMIT 1000
Try it!

Geomap of items

edit

Map of items without an image (P18) declaration in the Livorno (Q6761) area:

#defaultView:Map
SELECT ?item ?itemLabel ?coord WHERE {
  ?item wdt:P131 wd:Q6761;                                    # Items in Livorno (Q6761)
        wdt:P625 ?coord.                                      # That have geo coordinates
  FILTER NOT EXISTS { ?item wdt:P18 [] }                      # Exclude items WITH images
  FILTER NOT EXISTS { ?item wdt:P31/wdt:P279* wd:Q19860854 }  # Exclude items that are instance of (sub)classes of former geographical object
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it,en,mul". }
}
Try it!

Note: this query filters out items that are former objects (pictures cannot be taken now). Remove the filter if you want includes old pictures.

Map of churches in Italy

edit
#Mappa delle chiese in Italia (max 500)
#added 2017-08
#defaultView:Map
SELECT * WHERE {
  ?item wdt:P17 wd:Q38 .
  ?item wdt:P31*/wdt:P279* wd:Q16970;
        wdt:P625 ?geo .
}
LIMIT 500
Try it!

Map of churches in Livorno

edit
#defaultView:Map
# Select the ItemId, label and coordinate location
SELECT ?place ?placeLabel ?location WHERE {
  
       
  # Select the coordinate location(P625) of Livorno(Q6761) as the centeral coordinate ?mainLoc
  wd:Q6761 wdt:P625 ?mainLoc . 
  
  # Use the around service
  SERVICE wikibase:around { 
  # Looking for items with coordinate locations(P625)
    ?place wdt:P625 ?location . 
    # That are in a circle with a centre of ?mainLoc(The coordinate location of Berlin)
    bd:serviceParam wikibase:center ?mainLoc . 
    # Where the circle has a radius of 10km
    bd:serviceParam wikibase:radius "10" . 
  }
  
  # Use the label service to get the English label
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .  }
  
  ?place wdt:P31*/wdt:P279* wd:Q16970 .  # Instance of churches

}
LIMIT 200
Try it!

Occupazioni dei personaggi livornesi

edit
#Occupazioni dei personaggi livornesi
SELECT ?jobLabel (COUNT(?jobLabel) as ?Conteggio)
WHERE 
{
  ?item wdt:P19 wd:Q6761 .
  ?item wdt:P734 ?cognome.
  OPTIONAL { ?item wdt:P106 ?job .}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
GROUP BY ?jobLabel ORDER BY DESC(?Conteggio)
Try it!

Enti amministrativi

edit

Classi degli enti amministrativi italiani

edit

La classe administrative territorial entity of Italy (Q2824645) è composta da diverse divisioni amministrative:

Divisione Sottoclasse della divisione amministrativa Esempio
first-level administrative division (Q10864048) region of Italy (Q16110) Tuscany (Q1273) è una instance of (P31) region of Italy (Q16110)
second-level administrative division (Q13220204) province of Italy (Q15089) Province of Livorno (Q16200)
third-level administrative division (Q13221722) comune of Italy (Q747074) Comune di Florence (Q2044)
fourth-level administrative division (Q14757767) circoscrizione di decentramento comunale in Italy (Q13582281) borough of Bologna (Q3927244)


Composizione della giunta comunale di Montecatini Terme

edit
#Composizione della giunta comunale di Montecatini Terme
SELECT ?caricaricopertaLabel ?itemLabel  ?assessoratoLabel ?item
WHERE 
{
  { ?item wdt:P39 wd:Q3625593 }  #carica ricoperta = assessori
  UNION
  { ?item wdt:P39 wd:Q4657217 }
  UNION
  { ?item wdt:P39 wd:Q4011172 }  # vicesindaco 
  UNION 
  { ?item wdt:P39 wd:Q30185 }.   # sindaco 
  
  ?item wdt:P39 ?caricaricoperta.
  
  ?item p:P39 [                  # Qualificatori di 'carica ricoperta'
    pq:P642 wd:Q49605;           # di = Montecatini Terme
  ].
  
  # Occorre validare la carica tramite l'eventuale data di fine mandato
  
  MINUS {
    ?item p:P39 [               # Rimuovi gli assessori che hanno 'carica ricoperta' (P39)
      pq:P582 ?datadifine       # con una data di fine mandato (P582)
    ].
  }.
  
  OPTIONAL {
    ?item p:P39 [                
      pq:P101 ?assessorato       # Estrai assessorato dal qualificatore 'campo di lavoro'
    ].
  }
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Elenco storico dei sindaci di Livorno

edit
#Elenco storico dei sindaci di Livorno
SELECT  ?mayor ?mayorLabel ?datadiinizio ?datadifine 
WHERE 
{
  # Cerca tutte le persone che hanno ricoperto la carica di Sindaco di Livorno
  ?mayor p:P39 ?statement.
  ?statement ps:P39 wd:Q73499442.

  OPTIONAL { ?statement  pq:P580 ?datadiinizio }     # data di inizio mandato 
  OPTIONAL { ?statement  pq:P582 ?datadifine }       # data di fine mandato (P582)
   
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY ?datadiinizio
Try it!
#Elenco storico dei sindaci di Livorno
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
SELECT ?item ?itemLabel ?start ?endtime ?partyLabel WHERE {
  ?item wdt:P31 wd:Q5 .
  ?item p:P39 ?role.
  ?role ps:P39 wd:Q73499442 .
  OPTIONAL { ?role pq:P580 ?start.}
  OPTIONAL { ?role pq:P582 ?endtime.}
  
  OPTIONAL {
    ?item wdt:P102 ?party.
    ?party rdfs:label ?partyLabel .
    FILTER (LANG(?partyLabel) = "it") .
  
  }
  
  ?item rdfs:label ?itemLabel .
  FILTER (LANG(?itemLabel) = "it") .
}
order by (?start)

Clicca qui per eseguire la query su QLever

Sport

edit

Calciatori italiani in attività

edit
#Calciatori italiani in attività, ordinati per presunta età anagrafica

SELECT ?item ?itemLabel ?ruoloLabel ?datafinecarriera ?age
WHERE 
{
  ?item wdt:P27 wd:Q38.                               # Cittadino italiano
  ?item wdt:P106 wd:Q937857.                          # Occupazione calciatore
  
  MINUS {?item p:P106 [pq:P582 ?datafinecarriera]}.   # Elimina quelli che hanno il qualificatore di data di fine carriera
  MINUS { ?item wdt:P570 ?deathdate }                 # Elimina i deceduti

  OPTIONAL {?item wdt:P569 ?born. }                   # Calcola età 
  BIND(FLOOR((NOW() - ?born)/365.2425) AS ?age). 
  
  OPTIONAL { ?item wdt:P413 ?ruolo}.                  # Estrai il ruolo
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?age)
Try it!

Giocatori dell' Inter FC

edit
# Actual players of the Inter FC
SELECT ?player ?playerLabel ?age ?startyear
{
    ?player wdt:P31 wd:Q5.          # Human
    ?player wdt:P106 wd:Q937857 .   # Soccer player
    ?player wdt:P54 wd:Q631.        # Member of Inter F.C

    ?player p:P54 [                 # Pointer to statement "Member of.."
      ps:P54 wd:Q631;               # Pointer to the statement object "Inter"
      pq:P580 ?start                # Get the property qualifier "Start date" 
    ].

    # Filter out all the players that are not member anymore
    MINUS {
      ?player p:P54 [               # Pointer to statement "Member of.."
            ps:P54 wd:Q631;         # Pointer to the statement object "Inter"
            pq:P582 ?end            # Get the property qualifier "End date"
      ].
    }
  
    # Year of enrollment
    BIND (YEAR(?start) AS ?startyear)
  
    # Age
    ?player wdt:P569 ?birthdate.
    BIND(FLOOR((NOW() - ?birthdate)/365.2425) AS ?age). 
  
    SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],it" }  
}
ORDER BY ?startyear
Try it!

Radiantismo

edit

Notable amateur radio operators

edit
# Notable amateur radio operators
#defaultView:Tree
SELECT ?occupation ?occupationLabel ?item ?itemLabel  ?callsign
WHERE 
{
  ?item wdt:P5143 ?callsign;
        wdt:P106 ?occupation.
  FILTER(?occupation != wd:Q1939892).
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
order by ?occupationLabel
Try it!

Italian radio amateur satellites

edit
#Satelliti radioamatoriali italiani
SELECT ?item ?itemLabel ?cospar ?perigeo ?apogeo ?launchdate ?inclin ?period
WHERE 
{
  ?item wdt:P31 wd:Q455647. # Istanza di satellite per radioamatori
  ?item wdt:P495 wd:Q38
  OPTIONAL {?item wdt:P247 ?cospar. }
  OPTIONAL {?item wdt:P377 ?scn. }  
  OPTIONAL {?item wdt:P619 ?launchdate. }   

  OPTIONAL {?item wdt:P2243 ?apogeo. }   
  OPTIONAL {?item wdt:P2244 ?perigeo. }   
  OPTIONAL {?item wdt:P2045 ?inclin. }    
  
  OPTIONAL {?item wdt:P2146 ?period. }   
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en ". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
ORDER BY ?launchdate
Try it!

Geopolitica

edit

Stati membri della comunità europea

edit
# Membri della comunità europea
select ?item ?itemLabel where {
  
 ?item p:P463 ?stm.          # Members of something
 ?stm ps:P463 wd:Q458.       # Reference to the membership of EU
 MINUS { ?stm pq:P582 [] . } # Exclude members with and end date qualifier
 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
 
} order by (?itemLabel)
Try it!

Linux User Groups

edit

Elenco dei LUG italiani

edit
#Linux User Group: località e regione
SELECT ?item ?itemLabel ?cityLabel ?regionLabel ?affiliazioneLabel
WHERE
{
  ?item wdt:P31 wd:Q1138237;   # Istanza di (P31) di LUG 
        wdt:P17 wd:Q38;        # con Paese (P17) Italia
        
   OPTIONAL {?item wdt:P131 ?city.                  # Cerca le unità amministrative (P131)
             ?city wdt:P131+ ?region .              # Ricorsivamente, estrai tutte le unità amministrative della località dei LUG
             ?region wdt:P31/wdt:P279* wd:Q16110. } # Estrai solo la Regione (o una sua sottoclasse
   OPTIONAL {?item wdt:P361 ?affiliazione}
  
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } 
}
ORDER BY ?cityLabel
Try it!

Numero di LUG per regione

edit
#Linux User Group: numero di LUG per regione
SELECT ?regionLabel (COUNT (?item) as $count)
WHERE
{
  ?item wdt:P31 wd:Q1138237;   # Istanza di (P31) di LUG 
        wdt:P17 wd:Q38;        # con Paese (P17) Italia
        
   OPTIONAL {?item wdt:P131 ?city.        # Cerca le unità amministrative (P131)
             ?city wdt:P131+ ?region .    # Ricorsivamente, estrai tutte le unità amministrative della località dei LUG
             ?region wdt:P31/wdt:P279* wd:Q16110. } # Estrai solo la Regione 
  
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } # <span class="mw-translate-fuzzy">l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese</span>
}
GROUP BY ?region ?regionLabel
ORDER BY DESC (?count)
Try it!

LUG, SLUG e user group similari

edit
#Gruppo di utenti sul software libero o l'open source: include LUG
SELECT ?item ?itemLabel ?cityLabel ?regionLabel ?affiliazioneLabel
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q140404632;   # Istanza di (P31) di LUG 
        wdt:P17 wd:Q38;        # con Paese (P17) Italia
        
   OPTIONAL {?item wdt:P131 ?city.                  # Cerca le unità amministrative (P131)
             ?city wdt:P131+ ?region .              # Ricorsivamente, estrai tutte le unità amministrative della località dei LUG
             ?region wdt:P31/wdt:P279* wd:Q16110. } # Estrai solo la Regione (o una sua sottoclasse
   OPTIONAL {?item wdt:P361 ?affiliazione}
  
   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } 
}
ORDER BY ?cityLabel
Try it!

Storia

edit

Eventi della Prima Guerra Mondiale

edit
#Eventi della Prima Guerra Mondiale
SELECT ?item ?itemLabel ?locationLabel ?refdate ?enddate ?typeofeventLabel  # ?startdate ?eventdate
WHERE
{
  ?item wdt:P361 wd:Q361.           # "parte di" "Prima Guerra Mondiale"
  MINUS {?item wdt:P1269 wd:Q361.}  # exclude items that are "facet of" WW 1 (although not correct, could be both "part of" and "facet of")
  
  OPTIONAL{?item wdt:P31 ?typeofevent. } # Show the type of the recorded event: battle, military operation, etc...

  OPTIONAL{?item wdt:P580 ?startdate.} # Data di inizio
  OPTIONAL{?item wdt:P582 ?enddate.}   # Data di fine
  OPTIONAL{?item wdt:P585 ?eventdate.} # Data (usata nel caso di un evento)
  
  OPTIONAL{?item wdt:P276 ?location.}
  
  BIND(COALESCE(?startdate, ?eventdate) AS ?refdate). # Usa la "data" dell'evento se non è indicata una "data di inizio"
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "mul,it,en". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
ORDER BY(?startdate)
Try it!

Per modificare TABernacle

Astrofisica

edit

Osservatori Astronomici in Italia

edit

Ho fatto un lavoro di manutenzione e completamento degli Osservatori Astronomici italiani, sunto e stato è riportato nella pagina Manutenzione Osservatori Astronomici.

# Osservatori Astronomici in Italia
SELECT ?item ?itemLabel ?codiceMPC ?locationLabel ?regionLabel ?creationDate ?endDate ?coord 
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q1254933;           #Istanza di osservatori astronomici o sottoclassi
        wdt:P17 wd:Q38.                          # In Italia
  ?item wdt:P625 ?coord.                         # Coordinate geografiche
  OPTIONAL { 
    ?item wdt:P131 ?location. 
    ?item wdt:P131 ?city.                  # Cerca le unità amministrative (P131)
    ?city wdt:P131+ ?region .              # Ricorsivamente, estrai tutte le unità amministrative della località dell'item
    ?region wdt:P31/wdt:P279* wd:Q16110.           # Luogo di appartenenza
    }
  OPTIONAL {?item wdt:P717 ?codiceMPC. }         # codice Minor Planet Center
  OPTIONAL {?item wdt:P571 ?creationDate. }         # codice Minor Planet Center
  OPTIONAL {?item wdt:P576 ?endDate. }         # codice Minor Planet Center
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". } # l'etichetta verrà preferibilmente nella tua lingua, e altrimenti in inglese
}
ORDER BY ?regionLabel ?codiceMPC
Try it!

Osservatori e telescopi

edit
# Aggiungi questi prefissi espliciti per QLever
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?partof ?partofLabel
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q4213 . # Telescopes or subclasses
  ?item wdt:P361 ?partof. # Part of
  ?partof wdt:P31/wdt:P279* wd:Q1254933. # Observatory
  ?partof wdt:P131* wd:Q38 # In Italy
  
# 2. Ottieni l'etichetta del telescopio (in Italiano, fallback Inglese)
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER (lang(?itemLabel) = "it")
  }
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER (lang(?itemLabel) = "en")
  }
  # 3. Ottieni l'etichetta dell'osservatorio (in Italiano, fallback Inglese)
  OPTIONAL {
    ?partof rdfs:label ?partofLabel .
    FILTER (lang(?partofLabel) = "it")
  }
  OPTIONAL {
    ?partof rdfs:label ?partofLabel .
    FILTER (lang(?partofLabel) = "en")
  }
}
}

Clicca qui per eseguire la query su QLever

Osservatori toscani che non hanno definizione delle parti (telescopi)

edit

L'assenza della proprietà has part(s) (P527) implica che non ha definizione della dotazione dei telescopi.

# Aggiungi questi prefissi espliciti per QLever
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?location ?locationLabel 
WHERE
{
  ?item wdt:P31/wdt:P279* wd:Q1254933;  # Osservatori astronomici
        wdt:P131* wd:Q1273.              # In Toscana
  		
  FILTER NOT EXISTS {
    ?item wdt:P527 [].
  }

  ?item wdt:P131 ?location .

# 2. Ottieni l'etichetta del telescopio (in Italiano, fallback Inglese)
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER (lang(?itemLabel) = "it")
  }
  OPTIONAL {
    ?item rdfs:label ?itemLabel .
    FILTER (lang(?itemLabel) = "en")   
  }

  OPTIONAL {
    ?location rdfs:label ?locationLabel .
    FILTER (lang(?itemLabel) = "it")
  }
  OPTIONAL {
    ?location rdfs:label ?locationLabel .
    FILTER (lang(?locationLabel) = "en")   
  }
}

Clicca qui per eseguire la query su QLever

Contact

edit