Open main menu

FabC

Joined 10 January 2013

WikiprojectsEdit

Wikiproject:informaticsEdit

WikiProject Informatics/Operating SystemEdit

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

QueriesEdit

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 discontinued 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!

AstronauticaEdit

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

#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 
            ]
  }
 
  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 italianeEdit

SELECT ?industria_aerospaziale ?industria_aerospazialeLabel ?countryLabel ?paesesedelegale WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?industria_aerospaziale wdt:P452 wd:Q3477363.
  
  ?industria_aerospaziale wdt:P17 ?country. # Estrai il paese
  
  ?industria_aerospaziale wdt:P17 wd:Q38.  # Solo quelle italiane
  
  OPTIONAL { ?industria_aerospaziale wdt:P159 ?place }  # Sede legale
  OPTIONAL { ?place p:P17/psv:P17 [    # Paese
            wd:Q38 ?paesesedelegale 
            ]
  }
}
LIMIT 100

Try it!

Durata dell'attracco delle capsule SpaceX alla ISSEdit

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:P31 wd:Q5916.
  ?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 timelineEdit

#ISS assembly
#defaultView:Timeline
#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 .     # Part of ISS
  ?item wdt:P18 ?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 programEdit

#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!

Composizione della ISSEdit

Albero del prodotto della Stazione Spaziale Internazionale

Wikiproject:ItalyEdit

Wikidata:Wikiproject Italy

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

Scientific publicationsEdit

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

#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 keywordEdit

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 queriesEdit

Geomap of itemsEdit

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

#defaultView:Map
SELECT ?item ?itemLabel ?coord WHERE {
  ?item wdt:P131 ?sub1.
  ?sub1 wdt:P131* wd:Q6761. # Livorno (Q6761)
  ?item wdt:P625 ?coord.
  OPTIONAL { ?item wdt:P18 ?dummy0. }
  FILTER(!BOUND(?dummy0))
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Try it!

Map of churches in ItalyEdit

#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 LivornoEdit

#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 livornesiEdit

#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 amministrativiEdit

Composizione della giunta comunale di Montecatini TermeEdit

#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!

SportEdit

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 FCEdit

# 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!

ContactEdit