User:Pablo Busatto/WDQ

From Wikidata
Jump to navigation Jump to search

Wikisource pt[edit]

Authors on the Portuguese Wikisource[edit]

#Authors on the Portuguese Wikisource
SELECT ?author ?authorLabel
WHERE
{
	?author wdt:P31 wd:Q5 . #who are human
    ?page schema:about ?author.
	?page schema:isPartOf <https://pt.wikisource.org/> . #who are on pt.wikisource.org
	SERVICE wikibase:label { bd:serviceParam wikibase:language "pt" }
}
Try it!

Map[edit]

SELECT ?place ?placeLabel ?subj ?label ?coord ?birthyear WHERE {
	?subj wdt:P31 wd:Q5 . #who are human
    ?page schema:about ?subj.
	?page schema:isPartOf <https://pt.wikisource.org/> . #who are on pt.wikisource.org  
   ?subj wdt:P19 ?place . #lugar de nascimento
   ?place wdt:P625 ?coord . #coordenadas
   ?subj rdfs:label ?label filter (lang(?label) = "pt")
   OPTIONAL { ?subj wdt:P569 ?dob .}. #data de nascimento
	BIND(YEAR(?dob) as ?birthyear). #exibe ano de nascimento
         
 SERVICE wikibase:label {
  bd:serviceParam wikibase:language "pt" .
 }
}
Try it!

Autores brasileiros por UF[edit]

SELECT ?label ?subj ?placeLabel ?place ?ufLabel ?uf ?page WHERE {
	?subj wdt:P31 wd:Q5 . #who are human
    ?page schema:about ?subj.
	?page schema:isPartOf <https://pt.wikisource.org/> . #who are on pt.wikisource.org  
   ?subj wdt:P19 ?place . #lugar de nascimento
   ?place wdt:P625 ?coord . #coordenadas
  ?place wdt:P131 ?uf . #Estado
  ?place wdt:P17 wd:Q155 .
   ?subj rdfs:label ?label filter (lang(?label) = "pt")
   OPTIONAL { ?subj wdt:P569 ?dob .}. #data de nascimento
	BIND(YEAR(?dob) as ?birthyear). #exibe ano de nascimento
   OPTIONAL { ?subj wdt:P570 ?dod .}. #data de nascimento
	BIND(YEAR(?dod) as ?deathyear). #exibe ano de nascimento
  
 SERVICE wikibase:label {
  bd:serviceParam wikibase:language "pt-br,pt,it,fr,en" .
 }
}
Try it!

Outras[edit]

Campeões da série A do campeonato brasileiro[edit]

SELECT ?Campeonato_Brasileiro_de_Futebol___S_rie_A ?Campeonato_Brasileiro_de_Futebol___S_rie_ALabel ?vencido_por ?vencido_porLabel ?data_de_ocorr_ncia WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  ?Campeonato_Brasileiro_de_Futebol___S_rie_A wdt:P3450 wd:Q206813.
  OPTIONAL { ?Campeonato_Brasileiro_de_Futebol___S_rie_A wdt:P1346 ?vencido_por. }
  OPTIONAL { ?Campeonato_Brasileiro_de_Futebol___S_rie_A wdt:P585 ?data_de_ocorr_ncia. }
}
ORDER BY DESC(?data_de_ocorr_ncia)
Try it!