A SPARQL question - How can I improve this query?

47 views Asked by At

I have put the filter parameter, the LSOA code E01001117, in the PREFIX. I guess this is not best practice? Although the query work, I am not convinced I have an optimal query. Any comments welcome!

# endpoint= https://opendatacommunities.org/sparql

PREFIX lsoa: <http://opendatacommunities.org/id/geography/administration/lsoa/E01001117>
PREFIX adminGeo: <http://data.ordnancesurvey.co.uk/ontology/admingeo/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX pmd: <http://publishmydata.com/def/ontology/foi/>
SELECT ?LSOACD ?LSOANM ?LSOAstatus ?LADCD ?LADNM 
WHERE { 
  lsoa: adminGeo:inDistrict ?LAD .
  lsoa: skos:notation ?LSOACD .
  lsoa: pmd:displayName ?LSOANM .
  lsoa: skos:note ?LSOAstatus .
  ?LAD pmd:code ?LADCD .
  ?LAD pmd:displayName ?LADNM .
} LIMIT 10
0

There are 0 answers