SHARE
TWEET

Exe_SPARQL-1

jivagomr Nov 6th, 2019 (edited) 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PREFIX dbpedia: <http://dbpedia.org/ontology/>
  2. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  3. PREFIX schema: <http://schema.org/>
  4. PREFIX foaf: <http://xmlns.com/foaf/0.1/>
  5. PREFIX : <http://www.tecweb.inf.puc-rio.br/ontologies/gov-ont-payments#>
  6. PREFIX gov-ont-candidate: <http://www.tecweb.inf.puc-rio.br/ontologies/gov-ont-candidate#>
  7. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  8. PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
  9. PREFIX lodufrj: <http://lodbr.ufrj.br/>
  10.  
  11. #EXE-1#
  12. SELECT DISTINCT ?predicado WHERE {?Organization rdf:type dbpedia:Organization . ?Organization ?predicado ?objeto} LIMIT 100
  13.  
  14. #EXE-2#
  15. SELECT ?nome ?identificador WHERE {?Organization rdf:type dbpedia:Organization . ?Organization schema:identifier ?identificador . ?Organization foaf:name ?nome . FILTER REGEX(STR(?nome),"(.*)JBS(.*)","i") }
  16.  
  17. #EXE-3#
  18. SELECT ?pessoa ?nome WHERE {?pessoa rdf:type foaf:Person . ?pessoa foaf:name ?nome} ORDER BY ?nome LIMIT 2 OFFSET 4
  19.  
  20. #EXE-4#
  21. SELECT ?rotulo WHERE {?cargo rdf:type gov-ont-candidate:Role . ?cargo rdfs:label ?rotulo . FILTER (DATATYPE(?rotulo) = xsd:string)}
  22.  
  23. #EXE-5#
  24. SELECT ?IRI ?ano ?empregador ?estabelecimento ?count_trabalhadores ?uf
  25.     WHERE{
  26.         ?IRI rdf:type lodufrj:OntoSlavery\#OperacaoMPT.
  27.         ?IRI lodufrj:uf ?uf.
  28.         ?IRI lodufrj:ano_acao_fiscal ?ano.
  29.         ?IRI lodufrj:empregador_nome ?empregador.
  30.         ?IRI lodufrj:estabelecimento ?estabelecimento.
  31.         ?IRI lodufrj:trabalhadores_envolvidos ?count_trabalhadores.
  32.         FILTER (
  33.                 (STR(?uf) = "PA") &&
  34.                 (xsd:integer(?ano) >= 2010) &&
  35.                 (xsd:integer(?count_trabalhadores) >= 10)
  36.        )
  37. }
  38.  
  39. #EXE-6#
  40. SELECT ?IRI ?empregador ?ano ?count_trabalhadores
  41.     WHERE {
  42.         ?IRI rdf:type lodufrj:OntoSlavery\#OperacaoMPT.
  43.         ?IRI lodufrj:empregador_nome ?empregador.
  44.         ?IRI lodufrj:ano_acao_fiscal ?ano.
  45.         ?IRI lodufrj:trabalhadores_envolvidos ?count_trabalhadores.
  46.         FILTER CONTAINS(STR(?empregador), "JBS Aves Ltda")
  47.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top