query-22091812914204c7d48cfea914062b67

rq turtle/ttl

Nome ultimo abril

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT distinct ?item  ?itemLabel  ?commcat  ?slink ?stat   # ?datnas  ?datmor ?fleu ?foto 
# ?nick  ?pseu    ?alias # ?native ?label  #?ptwiki # ?itemDescription ?paisLabel
WHERE {

#    { ?item wdt:P69 wdt:Q66814784 . }  #FEBAUP

   #   optional { ?item wdt:P569 ?datnas . }
   #    optional { ?item wdt:P570 ?datmor . }
   #    optional { ?item wdt:P27  ?pais  }  
  #   optional { ?item wdt:P1317  ?fleuri  . }    



     #    filter not exists { ?item wdt:P18  ?foto  . }     #passa a not
     #      filter not exists  { ?item wdt:P569 ?datnas . } 
       #       filter not exists   { ?item wdt:P570 ?datmor . }
      #   filter not exists { ?item wdt:P106 ?occup . } 
            #   ?item wdt:P21 wd:Q6581072 .    #mulher
            #   ?item wdt:P166 ?premio .    #premios recebidos

   ?item wdt:P31 wd:Q5. 

    { ?item wdt:P27 wd:Q45.}    union
  { ?item wdt:P27 wd:Q45670. }  


       ?item wdt:P31 ?value ; wikibase:statements ?stat .  #numero de site links
       ?item wdt:P31 ?value ; wikibase:sitelinks ?slink .   #numero de statments



#  filter not exists  { ?item wdt:P1559 ?native . }   # name in native

 filter not exists  { ?item wdt:P734 ?gnome . }   # famili name

     { ?item wdt:P373 ?commcat . }   # comm cat

#label e alias
     #  { ?item rdfs:label ?label FILTER(lang(?label) = 'pt') .     }
# optional    { ?item rdfs:label ?label  .     }

       #  { ?item skos:altLabel ?alias FILTER (LANG (?alias) =  'pt')  }
#optional  { ?item skos:altLabel ?alias   }

  #   filter (regex (?itemDescription , ".*[a].*"  ))

  #      FILTER (?itemDescription != " ") 
  #     FILTER (?native = ?alias)

  #   {  ?ptwiki schema:about ?item ; schema:isPartOf <https://en.wikipedia.org/> . }
 # {  ?ptwiki schema:about ?item ; schema:isPartOf <https://pt.wikipedia.org/> . }

  {  ?comm schema:about ?item ; schema:isPartOf <https://commons.wikimedia.org/> . }

     SERVICE wikibase:label { bd:serviceParam wikibase:language "pt". }  
    #  SERVICE wikibase:label { bd:serviceParam wikibase:language "nl,fr,en,de,it,es,no,pt". }


# FILTER(NOT EXISTS {
 #  ?item rdfs:label ?lang_label.
#   FILTER(LANG(?lang_label) = "pt")
# })
}

ORDER BY desc (?slink) desc (?stat) 
LIMIT 15000

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v7("?comm") v6("?commcat"):::projected v4("?gnome") v3("?item"):::projected v1("?slink"):::projected v2("?stat"):::projected v5("?value") c6(["wd:Q45670"]):::iri c16(["pt"]):::literal c12([https://commons.wikimedia.org/]):::iri c5(["wd:Q45"]):::iri c14(["bd:serviceParam"]):::iri c3(["wd:Q5"]):::iri f0[["not "]] subgraph f0e0["Exists Clause"] e0v1 --"wdt:P734"--> e0v2 e0v2("?gnome"):::projected e0v1("?item"):::projected end f0--EXISTS--> f0e0 f0 --> v3 f0 --> c1 f0 --> v4 v3 --"wdt:P734"--> v4 v3 --"wdt:P31"--> c3 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P27"--> c6 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P27"--> c5 end union0r <== or ==> union0l end v3 --"wdt:P31"--> v5 v3 --"wikibase:statements"--> v2 v3 --"wdt:P31"--> v5 v3 --"wikibase:sitelinks"--> v1 v3 --"wdt:P373"--> v6 v7 --"schema:about"--> v3 v7 --"schema:isPartOf"--> c12 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c14 --"wikibase:language"--> c16 end