#### Template: ### Dumb -- no pass-through effect where heavy lifting is done by remote server SELECT * WHERE { SERVICE { ?s a ?o } } LIMIT 5 ### Smart -- pass-through via sub query where heavy lifting is done by remote server SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } ### DBpedia SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } ## Sindice.com SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } ##Nature.com SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } ### URIBURNER test SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } SELECT DISTINCT * WHERE { SERVICE { SELECT distinct * WHERE {?s a ?o.} LIMIT 5 } } ## Nature.com 1 SELECT DISTINCT * WHERE { SERVICE { SELECT ?doi ?title ?name WHERE { ?doi dc:title ?title . filter (regex(?title,"hydro","i")) . ?doi bibo:contributorList [ rdf:first [ foaf:name ?name ] ] . } LIMIT 25 } } ## Nature.com 2 PREFIX foaf: PREFIX npg: PREFIX npgd: PREFIX npgg: SELECT DISTINCT * WHERE { SERVICE { SELECT ?article ?mesh WHERE { ?article a npg:Article . ?article npg:hasRecord [ dc:subject ?mesh ] . filter regex(?mesh, "blood", "i") } LIMIT 25 } } ## Nature.com SPARUL PREFIX bibo: PREFIX dc: PREFIX dcterms: PREFIX foaf: PREFIX npg: PREFIX npgd: PREFIX npgg: PREFIX owl: PREFIX prism: PREFIX rdf: PREFIX rdfs: PREFIX sc: PREFIX skos: PREFIX void: prefix xsd: PREFIX bibo: INSERT INTO { ?doi dc:title ?title ; foaf:name ?name } WHERE { SERVICE { SELECT ?doi ?title ?name WHERE { ?doi dc:title ?title . FILTER (regex(?title,"hydro","i")) . ?doi bibo:contributorList [ rdf:first [ foaf:name ?name ] ] . } LIMIT 25 } }; ## health.data.gov ####################################### # # Retrieve all clinical quality averages for the US # # This query fetches descriptions for conditionId, measureId, metricId # ####################################### # PREFIX gd: PREFIX hoco: PREFIX dcterms: PREFIX comp: PREFIX rdfs: SELECT * WHERE { SERVICE { SELECT DISTINCT ?record ?date ?condition ?measure ?metric ?percentage ?ratio ?medianTime ?nationalCount ?msdrg ?footnote ?conditionId ?measureId ?metricId ?footnoteId WHERE { hoco:recordset _:rs. GRAPH ?g { _:rs hoco:record ?record . } ?g dcterms:issued ?date. OPTIONAL { ?record comp:condition ?conditionId. ?conditionId rdfs:comment ?condition. } OPTIONAL { ?record comp:measure ?measureId. ?measureId rdfs:comment ?measure. } OPTIONAL { ?record comp:metric ?metricId. ?metricId rdfs:comment ?metric. } OPTIONAL { ?record gd:percentage ?percentage. } OPTIONAL { ?record hoco:ratio ?ratio. } OPTIONAL { ?record hoco:medianTime ?medianTime. } OPTIONAL { ?record hoco:nationalCount ?nationalCount. } OPTIONAL { ?record hoco:msdrg ?msdrg. } OPTIONAL { ?record comp:footnote ?footnoteId. ?footnoteId rdfs:comment ?footnote. } } LIMIT 100 } } ##Patriots SELECT * WHERE { SERVICE {{ SELECT DISTINCT * FROM WHERE {?x a ; dbpedia-owl:activeYearsStartYear ?startYear; ; dbpprop:draftpick ?draftPic; dbpedia-owl:position ?position; dbpedia-owl:number ?number; dbpedia-owl:draftRound ?draftRound; dbpedia-owl:draftPick ?draftPick. optional {?x dbpedia-owl:activeYearsEndYear ?endYear} . optional {?x dbpprop:finalyear ?finalYear}. } }} } ## Bio Ontology Portal ## Mulgara based SPARQL Endpoint SELECT ?g ?label ?versionId ?virtualId ?format WHERE { SERVICE {{ SELECT ?graphURI ?label ?versionId ?virtualId ?format WHERE { GRAPH ?g { ?s ?label . ?s ?versionId . ?s ?virtualId . ?s ?format } } }} } ##RPI ## Tweaked re. problem variables and geopoints (?latitude and ?longitude) PREFIX dgp32: PREFIX xsd: SELECT * WHERE { SERVICE {{ SELECT * #FROM NAMED #WHERE { GRAPH { WHERE { GRAPH { ?s dgp32:eqid ?ad. ?s dgp32:eqid ?label. ?s dgp32:region ?region. ?s dgp32:datetime ?datetime. ?s dgp32:magnitude ?magnitude. ?s dgp32:depth ?depth. ?s dgp32:lat ?latitude. ?s dgp32:lon ?longitude. ?s dgp32:src ?src. filter ( xsd:float(?magnitude) >= 3 && xsd:float(?depth) <= 50 ) } } }} } ##Problem Query re. SPARQL+CXML special variables PREFIX dgp32: PREFIX xsd: SELECT ?id ?label ?datetime ?lat ?lon ?magnitude ?depth ?region ?src ?uri WHERE { service {{ SELECT ?id ?label ?datetime ?lat ?lon ?magnitude ?depth ?region ?src ?uri #FROM NAMED #WHERE { GRAPH { WHERE { GRAPH { ?uri dgp32:eqid ?id. ?uri dgp32:eqid ?label. ?uri dgp32:region ?region. ?uri dgp32:datetime ?datetime. ?uri dgp32:magnitude ?magnitude. ?uri dgp32:depth ?depth. ?uri dgp32:lat ?lat. ?uri dgp32:lon ?lon. ?uri dgp32:src ?src. filter ( xsd:float(?magnitude) >= 3 && xsd:float(?depth) <= 50 ) } } }} } ##GeoSpecies PREFIX foaf: PREFIX txn: PREFIX rdf: PREFIX dbpedia_owl: select distinct ?s as ?href ?order ?sciname ?authority ?cname ?year ?o as ?image ?aligned where { service {{ select distinct ?s ?order ?sciname ?authority ?cname ?year ?o ?aligned where { ?s rdf:type txn:SpeciesConcept. ?s txn:inDBpediaClade dbpedia_owl:Mammal. ?s foaf:depiction ?o. ?s txn:hasScientificName ?sciname. optional {?s umbel:isAligned ?aligned}. optional {?s txn:inCoLOrder ?order}. optional {?s txn:yearDescribed ?year}. optional {?s txn:commonName ?cname}. optional {?s txn:scientificNameAuthorship ?authority}. filter (lang(?authority) = "en") . } limit 1000 }} } ##DBpedia Graph on LOD SELECT * WHERE { SERVICE {{ SELECT DISTINCT * WHERE { ?href a dbpedia-owl:Person; rdfs:label ?name. OPTIONAL {?href foaf:depiction ?qrcode} . ?href rdfs:comment ?description. ?description bif:contains "CEO". FILTER (lang(?description) = "en") FILTER (lang(?name) = "en") } LIMIT 100 }} } ##Data.Gov.UK ## LOD endpoint SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?s a . ?s ?label . ?s ?lat . ?s ?long . } LIMIT 10 }} } ## Data.Gov.UK ##Talis Endpoint SELECT * WHERE { SERVICE { { SELECT * WHERE { ?s a . ?s ?p ?o. } LIMIT 10 } } } ##Talis Endpoint SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?s a . ?s ?label . ?s ?lat . ?s ?long . ?s ?addr. optional {?s ?gender}. optional {?s ?religion}. optional {?s ?type}. optional {?s ?refNo}. optional {?s ?estabNo}. ?addr ?addr1 . ?addr ?addr2. ?addr ?postcode. ?addr ?town. } LIMIT 200 }} } ##Data.Gov.UK's Talis Endpoint + Virtuoso SPARQL (using custom default image for CXML) based PivotViewer Page ## Note: () as ?image ## Used to set default Pivot Tiles Image SELECT ?s as ?href ?gender ?religion ?name ?lat ?long ?addr ?addr1 ?addr2 ?postcode ?town ?estabNo ?refNo ?type () as ?image WHERE { SERVICE { SELECT * WHERE { ?s a . ?s ?name. ?s ?lat . ?s ?long . ?s ?addr. OPTIONAL {?s ?gender}. OPTIONAL {?s ?religion}. OPTIONAL {?s ?type}. OPTIONAL {?s ?refNo}. OPTIONAL {?s ?estabNo}. ?addr ?addr1 . ?addr ?addr2. ?addr ?postcode. ?addr ?town. } LIMIT 200 } } ##Data.Gov.UK ## TSO (Garlik) PREFIX naptan: SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?stop naptan:administrativeArea ; naptan:street ?street ; naptan:naptanCode ?code } LIMIT 10 }} } ## TSO (Garlik) PREFIX naptan: SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?stop naptan:administrativeArea ; naptan:street ?street ; naptan:naptanCode ?code } LIMIT 100 }} } ##TSO (Garlik) ##Legislation PREFIX rdf: PREFIX rdfs: PREFIX xsd: PREFIX frbr: PREFIX dct: SELECT * WHERE { SERVICE { SELECT * WHERE { ?work a frbr:Work . ?work dct:title ?description . ?work dct:created ?date . ?work dct:subject ?subject. ?work dct:valid ?valid. ?work rdfs:label ?name. optional {?work foaf:depiction ?image}. FILTER (?date >= "2010-10-15"^^xsd:date) } LIMIT 100 } } ##Open University UK SELECT * WHERE { SERVICE {{ SELECT distinct ?x ?title ?description WHERE { ?x . ?x ?title. ?x ?description } LIMIT 10 }} } ##OpenEI (US Govt -- Energy Dept.) ## SPARQL-FED OpenEI PREFIX rdf: PREFIX rdfs: PREFIX swivt: PREFIX resource: PREFIX category: PREFIX property: SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?organization swivt:page ?page. ?organization property:Region resource:Bay_Area. ?organization rdfs:label ?name. OPTIONAL { ?organization foaf:depiction ?image}. OPTIONAL { ?organization property:Address ?address. }. OPTIONAL { ?organization property:Zip ?zip. }. OPTIONAL { ?organization property:Coordinates ?coordinates. }. OPTIONAL { ?organization property:Place ?place. ?place rdfs:label ?placename.}. OPTIONAL { ?organization property:Sector ?sector. ?sector rdfs:label ?sectorname.}. OPTIONAL { ?organization rdf:type ?category. ?category rdfs:label ?categoryname.}. } LIMIT 100 }} } ##OpenEI 2 PREFIX rdf: PREFIX rdfs: PREFIX swivt: PREFIX resource: PREFIX category: PREFIX property: PREFIX fprop: SELECT ?map ?image as ?qrcode ?image ?extent ?placeName ?author WHERE { SERVICE {{ SELECT DISTINCT ?image ?extent ?placeName ?author ?map WHERE { ?map rdf:type category:Map_Image_Files. ?map foaf:depiction ?image. OPTIONAL {?map property:Place ?place. ?place rdfs:label ?placeName. }. OPTIONAL { ?map fprop:GeographicExtent ?extent. }. OPTIONAL { ?map fprop:Author ?author. }. } LIMIT 1000 }} } ##Reegle.info ##European Green Energy Data Space PREFIX foaf: PREFIX dcterms: PREFIX reegle: PREFIX dbpedia-prop: SELECT * WHERE { SERVICE { SELECT DISTINCT * WHERE { ?actor a foaf:Organization; dcterms:subject ; foaf:name ?name. FILTER (lang(?name) = "en" ). ?actor foaf:depiction ?image. optional {?actor foaf:mbox ?mbox}. optional {?actor foaf:homepage ?homepage}. optional {?actor foaf:phone ?phone}. optional {?actor dcterms:subject ?subject}. optional {?actor reegle:mission ?mission}. optional {?actor reegle:activities ?activities}. optional {?actor reegle:activeIn ?activeIn}. optional {?actor foaf:depiction ?image}. optional {?actor reegle:mission ?mission}. optional {?actor dbpedia-prop:street ?street}. optional {?actor dbpedia-prop:city ?location}. optional {?actor dbpedia-prop:state ?state}. optional {?actor dbpedia-prop:abbreviation ?short}. optional {?actor dbpedia-prop:zipCode ?zip}. } LIMIT 50 } } ##Punkt ##PoolParty Endpoint PREFIX skos: SELECT * WHERE { SERVICE {{ SELECT * WHERE { ?Concept a skos:Concept. ?Concept skos:prefLabel ?prefLabel . } limit 100 }} } ## DBpedia SELECT * FROM FROM NAMED WHERE {     ?s a .     SERVICE (in ?s) {         graph { ?s ?p ?o .             filter (?p != ) } } OPTIONAL { ?p rdfs:label ?lbl } } ##DBpedia ## Movie DB PREFIX movie: PREFIX dbpedia: PREFIX foaf: SELECT ?actor_name ?birth_date WHERE { SERVICE {{ movie:actor ?actor . ?actor movie:actor_name ?actor_name }} SERVICE {{ ?actor2 a dbpedia:Actor ; foaf:name ?actor_name_en ; dbpedia:birthDate ?birth_date . FILTER(STR(?actor_name_en) = ?actor_name) }} }