Skip to content

Instantly share code, notes, and snippets.

@gpirrotta
Created November 14, 2019 19:01
Show Gist options
  • Save gpirrotta/9cf3ddc6ad8876e03287e8974389af5a to your computer and use it in GitHub Desktop.
Save gpirrotta/9cf3ddc6ad8876e03287e8974389af5a to your computer and use it in GitHub Desktop.
PREFIX osr: <http://dati.senato.it/osr/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT DISTINCT ?senatore ?nome ?cognome ?tipo ?dataNomina
WHERE {
?senatore a osr:Senatore.
?senatore foaf:firstName ?nome.
?senatore foaf:lastName ?cognome.
?senatore osr:mandato ?mandato.
OPTIONAL { ?mandato osr:fine ?fine }
?mandato osr:legislatura ?legislatura.
?mandato osr:tipoMandato ?tipo.
?mandato osr:dataNomina ?dataNomina.
?mandato osr:tipoMandato ?tipoMandato.
FILTER(REGEX(?nome, "Liliana","i")).
FILTER(REGEX(?cognome, "Segre","i")).
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment