File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # All surface water and animal tissue sample results from one samplepoint
1+ # Find all surface water and animal tissue sample results that report the contamination by an individual substance from one samplepoint (Maine EGAS SamplePoint 65555).
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
35PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
46PREFIX qudt: <http://qudt.org/schema/qudt/>
@@ -21,8 +23,7 @@ where {
2123 #Filter to a specific substance:
2224 # VALUES ?substance {}.
2325
24- ?measure coso:measurementValue ?value .
25- OPTIONAL { ?measure coso:measurementUnit ?unit .}
26+ ?measure coso:measurementValue ?value .
27+ OPTIONAL { ?measure coso:measurementUnit ?unit .}
2628 FILTER NOT EXISTS{ ?measure a coso:AggregateContaminantMeasurement} #remove results that are aggregates
27- } GROUP BY ?materialSample ?observation ?substance ?substanceL ?value ?unit
28- LIMIT 100
29+ } GROUP BY ?materialSample ?observation ?substance ?substanceL ?value ?unit
Original file line number Diff line number Diff line change 1- # Retrieve all sample points and count how many there are for each type of sample point
1+ # Retrieve how many sample points are there for each different type of sample point.
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
23
34PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Original file line number Diff line number Diff line change 1- # Retrieve all marine samplepoints and determine what and how many of each sample type are there
1+ # Retrieve all marine samplepoints and determine what types they are and how many of each type there are
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
23
34PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
45PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
@@ -7,6 +8,7 @@ PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
78PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
89PREFIX us-wqp-data: <http://w3id.org/sawgraph/v1/us-wqp-data#>
910
11+
1012SELECT ?sampletype ?typeLabel (COUNT (?sample ) as ?no_samples ) WHERE {
1113 ?sp rdf:type coso:SamplePoint;
1214 coso:pointFromFeature ?feature .
Original file line number Diff line number Diff line change 1+ # Find all soil samples that detected PFOS above the detection limit.
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
4+ PREFIX ds: <http://purl.org/ctic/dcat#>
5+ PREFIX dcterms: <http://purl.org/dc/terms/>
6+ PREFIX qudt: <http://qudt.org/schema/qudt/>
7+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
8+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
10+ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
11+ PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
12+ PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
13+ PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
14+
15+ SELECT * WHERE {
16+ ?sample a coso:MaterialSample; # all samples
17+ a coso:SoilSample; # soil samples
18+ coso:sampleOfMaterialType/rdfs:label ?sampleType . # with type labels
19+ ?observation coso:analyzedSample ?sample ;
20+ coso:ofSubstance ?substance ; # that were tested for a specific substance
21+ coso:hasResult ?result .
22+ ?substance rdf:type dsstox:ChemicalEntity ;
23+ skos:altLabel ?substanceLabel .
24+ VALUES ?substance {dsstox:DTXSID3031864} # where the substance is PFOS
25+ ?result coso:measurementValue ?measurement .
26+ FILTER NOT EXISTS {?measurement owl:sameAs coso:non-detect. }
27+
28+ } ORDER BY ?value
Original file line number Diff line number Diff line change 1+ # What are all the information that qualifies the results of measurement X?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
4+ PREFIX qudt: <http://qudt.org/schema/qudt/>
5+ PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
6+ PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
7+ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
8+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
9+
10+ SELECT *
11+ WHERE {
12+ VALUES ?measurement {me_egad_data:result.L204794007RE.AAWH.20201030.68259121} #us_wqp_data:d.wqp.measurement.STORET-987908414
13+ ?measurement a coso:ContaminantMeasurement;
14+ ?p ?qualifier .
15+ ?p rdfs:subPropertyOf coso:hasResultQualifier .
16+
17+ }
Original file line number Diff line number Diff line change 1- PREFIX ds: <http://purl.org/ctic/dcat#>
1+ # What soil samples have been tested for PFBS?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24PREFIX dcterms: <http://purl.org/dc/terms/>
35PREFIX qudt: <http://qudt.org/schema/qudt/>
46PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
57PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
68PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
79
8- # What soil samples have been tested for PFBS? What is min and max result?
910
1011SELECT * WHERE {
1112 ?sample a coso:MaterialSample; # all samples
1213 a coso:SoilSample; # soil samples
1314 coso:sampleOfMaterialType/rdfs:label ?sampleType ; # with type labels
1415 ^coso:analyzedSample ?observation .
15- ?observation coso:ofDSSToxSubstance ?dtxsid ; # that were tested for a specific substance
16- coso:ofDSSToxSubstance /rdfs:label ?substanceName ;
16+ ?observation coso:ofSubstance ?dtxsid ; # that were tested for a specific substance
17+ coso:ofSubstance /rdfs:label ?substanceName ;
1718 coso:hasResult ?measurement .
1819 ?measurement coso:measurementValue ?value ;
1920 coso:measurementUnit/qudt:symbol ?unit .
20- VALUES ?dtxsid {dsstox:DTXSID5030030} # where the substance is PFBS
21- VALUES ?substanceName {" Perfluorobutanesulfonic acid" } # Can alternately search substance by name
21+ VALUES ?dtxsid {dsstox:DTXSID5030030} # # where the substance is PFBS
22+ # VALUES ?substanceName{"Perfluorobutanesulfonic acid"} # Can alternately search substance by name
2223
2324} ORDER BY ?value
Original file line number Diff line number Diff line change 1+ # What soil samples have been tested for PFBS? What is the min and max result?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
4+ PREFIX owl: <http://www.w3.org/2002/07/owl#>
5+ PREFIX dcterms: <http://purl.org/dc/terms/>
6+ PREFIX qudt: <http://qudt.org/schema/qudt/>
7+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
8+ PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
9+ PREFIX dsstox: <http://w3id.org/DSSTox/v1/>
10+
11+ SELECT (max(?value ) as ?max_value ) (min(?value ) as ?min_value ) WHERE {
12+ ?sample a coso:MaterialSample; # all samples
13+ a coso:SoilSample; # soil samples
14+ coso:sampleOfMaterialType/rdfs:label ?sampleType ; # with type labels
15+ ^coso:analyzedSample ?observation .
16+ ?observation coso:ofSubstance ?dtxsid ; # that were tested for a specific substance
17+ coso:ofSubstance/rdfs:label ?substanceName ;
18+ coso:hasResult ?measurement .
19+ ?measurement coso:measurementValue ?value ;
20+ coso:measurementUnit/qudt:symbol ?unit .
21+ FILTER NOT EXISTS {?value owl:sameAs coso:non-detect } # and
22+ VALUES ?dtxsid {dsstox:DTXSID5030030} # where the substance is PFBS
23+
24+ } ORDER BY ?value
Original file line number Diff line number Diff line change 1+ # What wells have been tested for PFOA (CAS number 335671) at levels below 20 ppt or it was not detected?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
14PREFIX dcterms: <http://purl.org/dc/terms/>
25PREFIX qudt: <http://qudt.org/schema/qudt/>
36PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
47PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
58PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
69
7- # What wells have been tested for PFOA at levels below 20 ppt or it was not detected?
8-
910SELECT * WHERE {
1011 ?feature coso:ofFeatureType ?featureType ; # all features
1112 ^coso:pointFromFeature/^coso:observedAtSamplePoint ?observation . # with observations
Original file line number Diff line number Diff line change 1+ # Samples (in Maine) from what surface water bodies have a cumulative PFAS contamination result of above 20 ppt?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
14PREFIX qudt: <http://qudt.org/schema/qudt/>
25PREFIX unit: <http://qudt.org/vocab/unit/>
36PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
47PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
58PREFIX me_egad_data: <http://w3id.org/sawgraph/v1/me-egad-data#>
69
7- # Samples from what surface water bodies have a cumulative contamination result of above 20 ppt?
8-
910SELECT ?feature ?featureType ?sample ?date (SUM (?value ) as ?cumulativeConcentration ) ?unit WHERE {
1011 ?sample a coso:WaterSample; # All Water Samples
1112 a ?surfaceWater ; # of a particular class (surface water)
Original file line number Diff line number Diff line change 1- # What is the mean concentration of PFOA in fish tissue in Maine?
1+ # What is the mean concentration of all different PFAS tested for in fish tissue in Maine?
2+ # SUCCESSFULLY TESTED ON FRINK 2026-03-02
3+
24
35PREFIX kwgr: <http://stko-kwg.geog.ucsb.edu/lod/resource/>
46PREFIX kwg-ont: <http://stko-kwg.geog.ucsb.edu/lod/ontology/>
57PREFIX coso: <http://w3id.org/coso/v1/contaminoso#>
68PREFIX obo: <http://purl.obolibrary.org/obo/>
9+
10+
711select ?substance ?unit (AVG (?value ) as ?AvgConcentration ) (COUNT (?observation ) as ?sampleCount ) where {
812 ?observation a coso:ContaminantSampleObservation; # All observations
913 coso:analyzedSample ?sample ; # with related samples
@@ -17,7 +21,5 @@ select ?substance ?unit (AVG(?value) as ?AvgConcentration) (COUNT(?observation)
1721 ?region a kwg-ont:AdministrativeRegion_3. # administrative region (town/township)
1822 ?measurement coso:measurementValue ?value ; # with the result value
1923 coso:measurementUnit ?unit . # and unit
20- #SERVICE <repository:Spatial>{
2124 ?region kwg-ont:administrativePartOf+ kwgr:administrativeRegion.USA.23 # Where the town is part of Maine
22- #}
2325} GROUP BY ?substance ?unit
You can’t perform that action at this time.
0 commit comments