Babel user information
es-N Este usuario tiene una comprensión nativa del español.
en-3 This user has advanced knowledge of English.
ca-N Aquest usuari és un parlant natiu de català.
Users by language

SELECT ?item ?itemLabel ?_date_of_birth WHERE {

 ?item wdt:P106 wd:Q82594.
 {?item wdt:P106 wd:Q170790} union {?item wdt:P106 wd:Q169470}.
 SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
 OPTIONAL { ?item wdt:P569 ?_date_of_birth. }

} order by desc(?_date_of_birth)


Most frequent occupations without an article in Spanish


SELECT ?persona ?twitter WHERE { ?persona wdt:P31 wd:Q5. # personas

   ?persona p:P2002 ?statement .  # con usuario de Twitter
 OPTIONAL {

?persona wdt:P2002 ?twitter

}

 MINUS { ?persona wdt:P856 [] } . #sin página oficial
 #?persona schema:isPartOf <https://es.wikipedia.org/>. #con un artículo en la Wikipedia en español

}

Géneros de libros

SELECT ?g_nero_art_stico ?g_nero_art_sticoLabel (COUNT(?g_nero_art_stico) AS ?count) WHERE {

 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
 ?libro wdt:P31 wd:Q571.
 OPTIONAL { ?libro wdt:P136 ?g_nero_art_stico. }

} GROUP BY ?g_nero_art_stico ?g_nero_art_sticoLabel order by DESC(?count) LIMIT 300

Casas consistoriales de España (no confundir con ayuntamientos) edit
#defaultView:ImageGrid
SELECT ?imagen ?casa_consistorial ?ubicaci_n ?ubicaci_nLabel ?situado_en_la_entidad_territorial_administrativa ?situado_en_la_entidad_territorial_administrativaLabel ?casa_consistorialLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
  ?casa_consistorial wdt:P31 wd:Q543654.
  ?casa_consistorial wdt:P17 wd:Q29.
  OPTIONAL { ?casa_consistorial wdt:P18 ?imagen. }
  OPTIONAL { ?casa_consistorial wdt:P276 ?ubicaci_n. }
  OPTIONAL { ?casa_consistorial wdt:P131 ?situado_en_la_entidad_territorial_administrativa. }
}
ORDER BY ?situado_en_la_entidad_territorial_administrativaLabel

Para encontrar posibles casas consistoriales declaradas como ayuntamientos:

#defaultView:ImageGrid
SELECT ?imagen ?casa_consistorial ?ubicaci_n ?ubicaci_nLabel ?situado_en_la_entidad_territorial_administrativa ?situado_en_la_entidad_territorial_administrativaLabel ?casa_consistorialLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
  ?casa_consistorial wdt:P31 wd:Q22996476.
  ?casa_consistorial wdt:P17 wd:Q29.
  OPTIONAL { ?casa_consistorial wdt:P18 ?imagen. }
           { ?casa_consistorial wdt:P276 ?ubicaci_n. }
  OPTIONAL { ?casa_consistorial wdt:P131 ?situado_en_la_entidad_territorial_administrativa. }
}
ORDER BY ?situado_en_la_entidad_territorial_administrativaLabel
Castillos de España edit
#defaultView:ImageGrid
SELECT ?imagen ?castillo ?ubicaci_n ?ubicaci_nLabel ?situado_en_la_entidad_territorial_administrativa ?situado_en_la_entidad_territorial_administrativaLabel ?castilloLabel WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
  ?castillo wdt:P31 wd:Q23413.
  ?castillo wdt:P17 wd:Q29.
  OPTIONAL { ?castillo wdt:P18 ?imagen. }
  OPTIONAL { ?castillo wdt:P276 ?ubicaci_n. }
  OPTIONAL { ?castillo wdt:P131 ?situado_en_la_entidad_territorial_administrativa. }
}
ORDER BY ?situado_en_la_entidad_territorial_administrativaLabel
Situado en Valencia ordenado por instancia edit
#defaultView:ImageGrid
SELECT distinct ?estructura_arquitect_nicaLabel ?instancia_de ?instancia_deLabel ?imagen WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
  
  ?estructura_arquitect_nica wdt:P131 wd:Q8818.
  OPTIONAL { ?estructura_arquitect_nica wdt:P31 ?instancia_de. }
  OPTIONAL { ?estructura_arquitect_nica wdt:P18 ?imagen. }
}
ORDER BY ?instancia_deLabel ?estructura_arquitect_nicaLabel
Situado en Valencia ordenado por arquitecto edit
#defaultView:ImageGrid
SELECT  ?imagen ?arquitecto ?arquitectoLabel ?edificio ?edificioLabel WHERE {    
  ?edificio wdt:P131 wd:Q8818;   # situado en Valencia
            wdt:P84 ?arquitecto; # con al menos un arquitecto  
            wdt:P18 ?imagen.     # y al menos una imagen
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es".}
}
ORDER BY ?arquitectoLabel ?edificioLabel
Grados de personas edit
SELECT ?grado ?gradoLabel (COUNT(?grado) AS ?count) WHERE {

 SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
 ?persona wdt:P31 wd:Q5.
 ?persona wdt:P512 ?grado.
} GROUP BY ?grado ?gradoLabel order by DESC(?count) LIMIT 100
SELECT ?grado ?gradoLabel ?enlace (COUNT(?grado) AS ?count) WHERE {
 
 ?persona wdt:P31 wd:Q5;
          p:P69 [             #educado en
            pq:P512 ?grado
          ].  
  optional{
    ?enlace schema:about ?grado;
            schema:isPartOf <https://es.wikipedia.org/>
  }.
    SERVICE wikibase:label {
       bd:serviceParam wikibase:language "es"
    }  
} GROUP BY ?grado ?gradoLabel ?enlace order by DESC(?count)

Países de nacionalidad edit

#Países de nacionalidad comunes
#defaultView:BubbleChart
SELECT DISTINCT ?pais_nacionalidad ?pais_nacionalidadLabel ?enlace_pais ?count
WHERE
{
  {
    SELECT ?pais_nacionalidad (COUNT(?persona) AS ?count) WHERE {
      ?persona wdt:P27 ?pais_nacionalidad.
      ?enlace_persona schema:about ?persona. #La persona debe existir en la Wikipedia en español
      ?enlace_persona schema:isPartOf <https://es.wikipedia.org/>.

    }
    GROUP BY ?pais_nacionalidad ORDER BY DESC(?count) LIMIT 400                      
  }
  ?pais_nacionalidad wdt:P31/wdt:P279* wd:Q6256. #elimino los países que no son realmente países
  ?enlace_pais schema:about ?pais_nacionalidad.
  ?enlace_pais schema:isPartOf <https://es.wikipedia.org/>.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],es". }
} 
ORDER BY DESC(?count)

API de Wikibase edit

Ver Wikibase/API

Javascript:

$.ajax({

 url: '//www.wikidata.org/w/api.php',
 data: { action: 'wbgetentities', ids: mw.config.get('wgWikibaseItemId'), format: 'json' },
 dataType: 'jsonp',
 success: function (x) {
   console.log(x.entities.Q39246.labels.en.value);
   console.log(x.entities.Q39246.descriptions.en.value);
 }

});

No parece funcionar:

   run : function () {
       var self = this ;
       if ( self.running ) return ;
       self.running = true ;
       var q = mw.config.get('wgPageName').toLowerCase() ;
       self.q = q ;
       $.getJSON ( '//www.wikidata.org/w/api.php?callback=?' , {
           action : 'wbgetentities' ,
           ids : q ,
           format : 'json' ,
           sites : 'sites' ,
           props : 'sitelinks'
       } , function ( data ) {
           alert('q: ' + q + ' data.entities[q]: ' + data.entities[q]); // CAMBIO
           if ( undefined === data.entities[q] || undefined === data.entities[q].sitelinks || undefined === data.entities[q].sitelinks.eswiki ) { // CAMBIO
               alert ( "Could not find es.wikipedia page, aborting" ) ; // CAMBIO
               return ;
           }
           var title = data.entities[q].sitelinks.enwiki.title ;
           self.loadStatements ( 'es.wikipedia' , title ) ;// CAMBIO
       } ) ;
   } ,

{{List of properties/Row}}

Title ID Data type Description Examples Inverse
instance ofP31Iteminstance of: that class of which this subject is a particular example and member; different from P279 (subclass of); for example: K2 is an instance of mountain; volcano is a subclass of mountain (and an instance of volcanic landform)The Autobiography of Alice B. Toklas <instance of> book-