Subsurface Exploration Information Needs and SPARQL Queries

This page contains all information needs and SPARQL queries for the Semantic web resource for the Slegge database. Each information need is translated to zero or more SPARQL queries. Some information needs does not have a SPARQL query translation since they require data that is not covered by the Slegge database, and some information needs are translated into multiple SPARQL queries in order to capture variations in the ontology vocabulary and SPARQL expressivity.

Table of Contents

1 Information Need 001

In my area of interest (AOI) return the wellbores that penetrates
chronostrat unit <C1> and return information about the
lithostratigraphy and the hydrocarbon content (saterated and moveable
+ shows) in the wellbore interval that penetrates the <C1> unit. Also
return information about other wellbore intervals with hydrocarbon
content (saterated and moveable + shows) in the wellbores with
hydrocarbon in <C1>.

## DOMAIN: well, stratigraphy
## COMMENT: 
## The hydrocarbon content is not well modelled or mapped yet.

##The "Area of Interest (AOI)" is rather
## abstract and must be conretized in any sparql query. It is
## interpreted in the SPARQL here as either Field, or some arbitrary
## rectangular geographic area

## Queries 07 and 08 only differ in that AOI is field in one, and a
   geographical area in the other.

1.1 SPARQL Query ./001/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit ?column ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :hasWellboreInterval  ?int ;
           :name                 ?wellbore .
    ?int   a                     :StratigraphicZone ;
           :hasUnit              ?u .
    ?u     :ofStratigraphicColumn  ?col ;
           :name                 ?unit .
    ?col   :name                 ?column .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

1.2 SPARQL Query ./001/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?w ?c1
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      a                     :StratigraphicZone ;
              :hasUnit              ?c1 .
    ?c1       :ofStratigraphicColumn  ?col .
    ?col      a                     :ChronoStratigraphicColumn .
    ?int      :overlapsWellboreInterval  ?litho_int .
    ?litho_int  :hasUnit            ?lu .
    ?lu       :ofStratigraphicColumn  ?l_col .
    ?l_col    a                     :LithoStratigraphicColumn .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }
ORDER BY ?w ?c1

1.3 SPARQL Query ./001/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?top_md ?bottom_md ?unit ?column
WHERE
  { ?w       a                     :Wellbore ;
             :hasWellboreInterval  ?int ;
             :name                 ?wellbore .
    ?int     a                     :StratigraphicZone ;
             :hasTopDepth  ?top ;
             :hasTopDepth  ?bottom ;
             :hasUnit              ?u .
    ?top     :valueInStandardUnit  ?top_md .
    ?bottom  :valueInStandardUnit  ?bottom_md .
    ?u       :ofStratigraphicColumn  ?col ;
             :name                 ?unit .
    ?col     :name                 ?column .
    ?well    :hasWellbore          ?w ;
             :locatedIn            ?pos .
    ?pos     :latitude             ?lat ;
             :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

1.4 SPARQL Query ./001/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      a                     :StratigraphicZone ;
              :hasUnit              ?c1 .
    ?c1       :ofStratigraphicColumn  ?col .
    ?col      a                     :ChronoStratigraphicColumn .
    ?int      :overlapsWellboreInterval  ?litho_int .
    ?litho_int  :hasUnit            ?lu .
    ?lu       :ofStratigraphicColumn  ?l_col .
    ?l_col    a                     :LithoStratigraphicColumn .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
    ?f  a                     :FluidZone .
    ?w  :hasWellboreInterval  ?f ;
        :name                 ?wellbore .
    ?f  :overlapsWellboreInterval  ?int ;
        :fluidZoneContent     ?content
  }

1.5 SPARQL Query ./001/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?w
WHERE
  { ?w     a                     :Wellbore .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

1.6 SPARQL Query ./001/06.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :hasWellboreInterval  ?int .
    ?int   a                     :StratigraphicZone ;
           :hasUnit              ?c1 .
    ?c1    :ofStratigraphicColumn  ?col .
    ?col   a                     :ChronoStratigraphicColumn .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
    ?f  a                     :FluidZone .
    ?w  :hasWellboreInterval  ?f ;
        :name                 ?wellbore .
    ?f  :overlapsWellboreInterval  ?int ;
        :fluidZoneContent     ?content
  }

1.7 SPARQL Query ./001/07.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?fld      a                     :Field .
    ?well     :inField              ?fld ;
              :hasWellbore          ?w .
    ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      a                     :StratigraphicZone ;
              :hasUnit              ?c1 .
    ?w        :hasWellboreInterval  ?litho_zone .
    ?litho_zone  :hasUnit           ?litho_unit ;
              :overlapsWellboreInterval  ?int .
    ?w        :hasWellboreInterval  ?f ;
              :name                 ?wellbore .
    ?f        :overlapsWellboreInterval  ?int ;
              :fluidZoneContent     ?content .
    ?w        :hasWellboreInterval  ?other_hc .
    ?other_hc  :fluidZoneContent    ?other_content
  }

1.8 SPARQL Query ./001/08.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      a                     :StratigraphicZone ;
              :hasUnit              ?c1 .
    ?w        :hasWellboreInterval  ?litho_zone .
    ?litho_zone  :hasUnit           ?litho_unit ;
              :overlapsWellboreInterval  ?int .
    ?w        :hasWellboreInterval  ?f ;
              :name                 ?wellbore .
    ?f        :overlapsWellboreInterval  ?int ;
              :fluidZoneContent     ?content .
    ?w        :hasWellboreInterval  ?other_hc .
    ?other_hc  :fluidZoneContent    ?content .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

2 Information Need 002

Return the wellbores that do not penetrate chronostrat unit <C1> and
give information about why they do not. Possible outcomes of why not:
Not drilled far enough, eroded, not deposited, missing due to faulting

## DOMAIN: well, stratigraphy
## COMMENT: Not sure if info about "why not" are possible to extract with sql from database

2.1 SPARQL Query ./002/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?w
WHERE
  { ?w  a                     :Wellbore
    FILTER NOT EXISTS { ?w        :hasWellboreInterval  ?wi .
                        ?wi       :hasUnit              ?c1 .
                        ?c1       :name                 "Jurassic" ;
                                  :ofStratigraphicColumn  ?chrono_col .
                        ?chrono_col  a                  :ChronoStratigraphicColumn
                      }
  }

3 Information Need 003

Wellbore reservoir info: (previous question in a different manner) In my
AOI, return wellbores with reservoir

• If there is reservoir, then give assosicated information (overlapping
3d line intervals with attributes + ?3d points with attributes)

– Chronostratigraphy (wellbore interval with name, hierarchy, top
and base age, top and base depth (MD RKB, TVD MSL,..)
– Lithostratigraphy (wellbore interval with name, hierarchy, top
and base depth (MD RKB, TVD MSL,..)
– Hydrocarbon content (saturated and moveable, residual, shows)
– Reservoir properties: Porosity, permeability, Net to Gross ratio,
Net thickness (MD), Net thickness (TVD)

• Return also any information about insuffisient data coverage to an-
swer the question

• Possible answer for a wellbore: Wellbore W3 has got a OIL discovery
in C1 in the L1. The well bore also got a discovery (gas with oil leg,
down to situation) in C2/L3 ..+ TVDs, MDs, porosities, .

## DOMAIN: well, stratigraphy, reservoir
## COMMENT: A "reservoir" is (at least in this context) a wellbore
## interval with measured fluid or gas presence. Specifically, a
## reservoir is here (surprisingly) not a 3d volume, but rather the
## porition of the 3d volume intersected by the
## wellbore. "Insufficient data coverage" is probably out of
## scope. Gross depth is depth measured along wellbore, while net
## depth is the difference in vertical depth between bottom and
## top. (Recall that wellbores are usually not vertical). Net-to-gross
## ratio is the ratio of these depths. It is not clear what "measured
## net thickness" means. Probably this is an error in the
## question. "MD RKB" means : measured depth along wellbore from the
## "rotary kelly bush". The latter is just a standard reference point
## for a wellbore, and its nature is not important for geologists.

## 05.q asks for all the depths of any stratigraphic zones overlapping
   with the reservoir.
## 06.q asks for all the measurements done along the reservoir plus
   that 05.q asks for. To be complete, both these blocks are put in optional
# Cleaner version
# Author: Dag Hovland
# Time: 2014-05-23
Input: A list of wellbores
Output: List all reservoirs (wellbore intervals with measured fluid presence) in the wellbores. For each reservoir list: porosity measurement, permeability measurement, net-to-gross ratio, net and gross thickness, top and bottom in measured depth and true vertical depth of the reservoir and finally all stratigraphic units of stratigraphic zones overlapping/intersecting the reservoir. 


# SPARQL for clarification reasons (Not relating to any ontology)

SELECT ?wellbore ?hc ?overlapping_unit ?ntg ?top_depth_md ?bottom_depth_md ?top_depth_tvd ?bottom_depth_tvd ?net_thickness ?gross_thickness WHERE {
       ?w a :Wellbore;
          :name ?wellbore.
	  :hasReservoir ?r.
       ?r :hasPorosity ?porosity.
       OPTIONAL {?r :hasPermeability ?permeability.}
       OPTIONAL {?r :hasPorosity ?porosity.}
       OPTIONAL {?r :hasTopDepth [a :MeasuredDepthRKB; :hasValue ?top_depth_md].}
       OPTIONAL {?r :hasBottomDepth [a :MeasuredDepthRKB; :hasValue ?bottom_depth_md].}
       OPTIONAL {?r :hasTopDepth [a :TrueVerticalDepthMSL; :hasValue ?top_depth_tvd].}
       OPTIONAL {?r :hasBottomDepth [a :TrueVerticalDepthMSL; :hasValue ?bottom_depth_tvd].}
       OPTIONAL {?r :hasNetToGrossRatio ?ntg.}		
       OPTIONAL {?r :hasNetThickness [:hasValue ?net_thickness].}
       OPTIONAL {?r :hasGrossThickness [:hasValue ?gross_thickness].}
       OPTIONAL {?r :hasFluidContent ?hc.}
       OPTIONAL {?r :overlapsWellboreInterval [ a :StratigraphicZone; :hasUnit ?overlapping_unit.].}
}
	  
# SPARQL relating to possible ontology

SELECT ?wellbore ?hc ?overlapping_unit WHERE {
       ?w a :Wellbore;
          :name ?wellbore.
	  :hasWellboreInterval ?reservoir.
       ?reservoir a :FluidZone.
       ?reservoir :overlapsWellboreInterval :hasPorosity ?porosity.
       OPTIONAL {?r :hasPermeability ?permeability.}
       OPTIONAL {?r :hasPorosity ?porosity.}
       OPTIONAL {?r :hasTopDepth [a :MeasuredDepthRKB; :hasValue ?top_depth_rkb].}
       OPTIONAL{?r :hasBottomDepth [a :MeasuredDepthRKB; :hasValue ?bottom_depth_rkb].}
       OPTIONAL{?r :hasTopDepth [a :TrueVerticalDepthMSL; :hasValue ?top_tvd_msl].}
       OPTIONAL{?r :hasBottomDepth [a :TrueVerticalDepthMSL; :hasValue ?bottom_depth_tvd_msl].}
       OPTIONAL {?r :hasFluidContent ?hc.}
       OPTIONAL {?r :overlapsWellboreInterval [ a :StratigraphicZone; :hasUnit ?overlapping_unit.].}
}

3.1 SPARQL Query ./003/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore ?content
WHERE
  { ?w    a                     :Wellbore ;
          :name                 ?wellbore ;
          :hasWellboreInterval  ?int .
    ?int  a                     :FluidZone ;
          :fluidZoneContent     ?content
  }

3.2 SPARQL Query ./003/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit_name ?discovery
WHERE
  { ?w       a                     :Wellbore ;
             :name                 ?wellbore ;
             :hasWellboreInterval  ?c_int ;
             :hasWellboreInterval  ?f_int .
    ?c_int   :hasUnit              ?c_unit .
    ?c_unit  :name                 ?unit_name .
    ?f_int   a                     :FluidZone ;
             :name                 ?discovery ;
             :overlapsWellboreInterval  ?c_int
  }

3.3 SPARQL Query ./003/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit_name ?discovery ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?c_int ;
              :hasWellboreInterval  ?f_int .
    ?c_int    :hasUnit              ?c_unit .
    ?c_unit   :name                 ?unit_name ;
              :ofStratigraphicColumn  ?chrono_col .
    ?chrono_col  a                  :ChronoStratigraphicColumn .
    ?f_int    a                     :FluidZone ;
              :name                 ?discovery ;
              :overlapsWellboreInterval  ?c_int .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

3.4 SPARQL Query ./003/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit_name ?discovery ?chrono_top_depth_md_m ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?c_int ;
              :hasWellboreInterval  ?f_int .
    ?c_int    :hasUnit              ?c_unit .
    ?c_unit   :name                 ?unit_name ;
              :ofStratigraphicColumn  ?chrono_col .
    ?chrono_col  a                  :ChronoStratigraphicColumn .
    ?f_int    a                     :FluidZone ;
              :name                 ?discovery ;
              :overlapsWellboreInterval  ?c_int .
    ?c_int    :hasTopDepth  ?top_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?chrono_top_depth_md_m .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

3.5 SPARQL Query ./003/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit_name ?discovery ?chrono_top_depth_md_m ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?c_int .
    ?c_int    :hasUnit              ?c_unit .
    ?c_unit   :name                 ?unit_name .
    ?f_int    a                     :FluidZone ;
              :name                 ?discovery ;
              :overlapsWellboreInterval  ?c_int .
    ?c_int    :hasTopDepth  ?top_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?chrono_top_depth_md_m .
    ?c_int    :hasBottomDepth  ?bot_md .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?chrono_bot_depth_md_m .
    ?c_int    :hasTopDepth  ?top_tvd .
    ?top_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?chrono_top_depth_tvd_m .
    ?c_int    :hasBottomDepth  ?bot_tvd .
    ?bot_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?chrono_bot_depth_tvd_m .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }
ORDER BY ?discovery

3.6 SPARQL Query ./003/06.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?unit_name ?discovery ?chrono_top_depth_md_m ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?fint .
    ?fint  a                     :FluidZone ;
           :name                 ?discovery .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
    OPTIONAL
      { ?w        :hasWellboreInterval  ?c_int .
        ?c_int    :hasUnit              ?c_unit .
        ?c_unit   :name                 ?unit_name .
        ?fint     :overlapsWellboreInterval  ?c_int .
        ?c_int    :hasTopDepth  ?top_md .
        ?top_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?chrono_top_depth_md_m .
        ?c_int    :hasBottomDepth  ?bot_md .
        ?bot_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?chrono_bot_depth_md_m .
        ?c_int    :hasTopDepth  ?top_tvd .
        ?top_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?chrono_top_depth_tvd_m .
        ?c_int    :hasBottomDepth  ?bot_tvd .
        ?bot_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?chrono_bot_depth_tvd_m
      }
    OPTIONAL
      { ?w   :hasMeasurement       ?m .
        ?m   :hasDepth  ?md .
        ?md  :inWellboreInterval   ?fint ;
             :valueInStandardUnit  ?measurement
      }
  }
ORDER BY ?discovery

4 Information Need 004

In my AOI, return all seismic data the company has got rights that is not
loaded to the project databases.

## DOMAIN: seismic, legal
## COMMENT: Probably not possible to do with sql

5 Information Need 005

In my AOI, identify any available seismic that is available, but is not
owned by the company.

## DOMAIN: seismic, legal
## COMMENT: Same as 004 - probably not possible with SQL

6 Information Need 006

In my AOI, return all wellbore reports as hyperlink. Return information
on any wellbore report that is existing but is not available.

## DOMAIN: well
## COMMENT: "not available" may be out of optique's scope
## ALl wellbore reports may be hard, but at least the slegge documents
## are available

## 01.q just asks for all documents and all its links 
## 02.q adds distinct and order by
## 03.q specifies an arbitrary geographical area of interest

6.1 SPARQL Query ./006/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w    a                     :Wellbore ;
          :wellboreDocument     ?doc .
    ?doc  :hasURL               ?document_hyperlink
  }

6.2 SPARQL Query ./006/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w    a                     :Wellbore ;
          :wellboreDocument     ?doc .
    ?doc  :hasURL               ?document_hyperlink
  }
ORDER BY ?w

6.3 SPARQL Query ./006/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w     a                     :Wellbore ;
           :wellboreDocument     ?doc .
    ?doc   :hasURL               ?document_hyperlink .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }
ORDER BY ?w

7 Information Need 007

In my AOI, return all internal wellbore studies that are performed as a
hyperlink.

## DOMAIN: well
## We have not been able to find out whether this is different from
## 006, i.e. are "wellbore reports" and "wellbore studies" something different.

8 Information Need 008

In my AOI, return all geochemical sample data with interpretations useful
for a geologist. Data should be tagged with key stratigraphy information.

## DOMAIN: well, geochem
## Geochemical sample data should probably be data from geochem, so
## this can probably only be run when integration with geochem is done
## Interpretations useful for a geologist is unclear what means.
## "Tagging" with key stratigraphy information probably means just
## getting the strat-zones that overlap the measurement site.

## 01.q This query will not run yet, since geochemistry is not
   integrated with the rest. It asks for any measurement under [[se:GeochemicalMeasurement]]

8.1 SPARQL Query ./008/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        :hasGeochemicalMeasurement  ?measurement .
    ?measurement  :peakName         ?peakName ;
              :cgType               ?cgtype
    OPTIONAL
      { ?measurement  :peakAmount  ?p }
    OPTIONAL
      { ?measurement  :peakArea  ?area }
    OPTIONAL
      { ?measurement  :peakHeight  ?h }
  }

8.2 SPARQL Query ./008/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasGeochemicalMeasurement  ?measurement .
    ?measurement  :cgType           ?cgtype ;
              :peakName             ?peakType ;
              :peakHeight           ?peak_height ;
              :peakAmount           ?peak_amount
  }

9 Information Need 009

In my AOI, return all pressure data tagged with key stratigraphy informa-
tion with understandable QC attributes. Available for further filetering.

## DOMAIN: well, pressure, stratigraphy

9.1 SPARQL Query ./009/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasFormationPressure  ?pressure .
    ?pressure  a                    :Pressure ;
              :hasDepth  ?pressure_depth
    OPTIONAL
      { ?pressure_depth
                  :inWellboreInterval  ?strat_zone .
        ?strat_zone  :hasUnit          ?strat_unit
      }
  }

10 Information Need 010

For my AOI, return all logs and understand synonyms.

## DOMAIN: well log
## The logs have not been modelled and mapped yet, but the query
## itself should be rather straightforward.
## "Synonyms" probably refer to different names for the same
## wellbore. This should probably be handled in the mappings and/or
## the owl:sameAs treatment.

11 Information Need 011

For my AOI use the selected numerical wellbore logs with cut offs and
stratigraphy to find Gross thickness, Net thickness, Nett to gross ratio,
porosity statistics (mean, mode, min, P10, P90, max), other wellbore log
statistics.

## DOMAIN: well, stratigraphy, log, porosity, thickness
## Calculating these numbers in the ontology is probably not pratical?

12 Information Need 012

In my area, what were the wellbore targets (why was the wellbore drilled?
Could be several targets in on wellbore) amplitude anomaly, structure,
high potential, (shallow target, but deeper drilling obligation), ......

## DOMAIN: well
## COMMENT: We're not sure where this information recides and whether
## it can be fetched with SQL

13 Information Need 013

Compare prognosed with evaluation results. If not discovery, then what
risk element (list) failed?

## DOMAIN: well
## We dont understand if this can be answered with an SQL query

14 Information Need 014

In my AOI, return all formation water samples tagged with key stratigra-
phy information.

## DOMAIN: stratigraphy, water sample
## Water samples are not modelled in the ontology

15 Information Need 015

Show all norwegian wellbores with some aditional attributes (wellbore id,
completion date, oldest penetrated age,result). Limit to all wellbores with
a core and show attributes like (wellbore id, core number, top core depth,
base core depth, intersecting stratigraphy). Limit to all wellbores with
core in Brentgruppen and show key atributes in a table.
After connecting to EPDS (slegge) we could for instance limit futher to
cores in Brent with measured permeability and where it is larger than a
given value, for instance 1 mD. We could also find out whether there are
cores in Brent which are not stored in EPDS (based on NPD info) and
where there could be permeability values. Some of the missing data we
possibly own, other not.


## DOMAIN: well, core, stratigraphy
## THe last question, about cores in EPDS vs. NPD is not properly
## modelled and mapped yet.

15.1 SPARQL Query ./015/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wName ?sample ?permeability ?top_depth_md ?lat ?long
WHERE
  { ?w       a                     :Wellbore ;
             :name                 ?wName ;
             :hasWellboreInterval  ?ci .
    ?c       :extractedFrom        ?ci .
    ?ci      :overlapsWellboreInterval  ?z .
    ?z       :hasUnit              ?u .
    ?u       :name                 ?strat_unit_name .
    ?c       :hasCoreSample        ?sample .
    ?sample  :hasPermeability  ?p .
    ?p       :valueInStandardUnit  ?permeability .
    ?ci      :hasTopDepth  ?top .
    ?top     a                     :MeasuredDepth ;
             :valueInStandardUnit  ?top_depth_md .
    ?well    :hasWellbore          ?w ;
             :locatedIn            ?pos .
    ?pos     :latitude             ?lat ;
             :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

15.2 SPARQL Query ./015/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability ?lat ?long
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name ;
        :hasWellboreInterval  ?interval
    FILTER regex(?wellbore_name, "NO 34")
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName .
    ?c        :hasCoreSample        ?s .
    ?s        :hasPermeability  ?p ;
              :name                 ?sample_name .
    ?p        :valueInStandardUnit  ?permeability .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 61 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

15.3 SPARQL Query ./015/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name
    FILTER regex(?wellbore_name, "NO 34")
    ?w  :hasWellboreInterval  ?ci .
    ?c  :extractedFrom        ?ci ;
        :hasCoreSample        ?s .
    ?s  :name                 ?core_sample_name ;
        :hasPermeability  ?p .
    ?p  :valueInStandardUnit  ?permeability
  }

15.4 SPARQL Query ./015/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "BRENT", "i")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p ;
        :name                 ?sample_name .
    ?p  :valueInStandardUnit  ?permeability
    FILTER ( ?permeability > 1.0 )
  }

15.5 SPARQL Query ./015/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wName ?sample ?permeability ?top_depth_md ?compl_date
WHERE
  { ?w       a                     :Wellbore ;
             :name                 ?wName ;
             :hasWellboreInterval  ?ci .
    ?c       :extractedFrom        ?ci .
    ?ci      :overlapsWellboreInterval  ?z .
    ?z       :hasUnit              ?u .
    ?u       :name                 ?strat_unit_name .
    ?c       :hasCoreSample        ?sample .
    ?sample  :hasPermeability  ?p .
    ?p       :valueInStandardUnit  ?permeability
    FILTER ( ?permeability > 1.0 )
    FILTER regex(?strat_unit_name, "BRENT", "i")
    ?ci   :hasTopDepth  ?top .
    ?top  a                     :MeasuredDepth ;
          :valueInStandardUnit  ?top_depth_md
    OPTIONAL
      { ?w  :completionDate  ?compl_date }
  }

16 Information Need 016

What are the wellbores with total core length larger than 30 m?

## DOMAIN: well, core

# 02.q is only the query taken literally
# 01.1 also filters on a geographic area
# 03.q is the query literally, but optionally also with any
# stratigraphy in the wellbore.

16.1 SPARQL Query ./016/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?total_cored_length ?lat ?long
WHERE
  { ?w    a                     :Wellbore ;
          :name                 ?wellbore ;
          :hasTotalCoreLength       ?tcl .
    ?tcl  :valueInStandardUnit  ?total_cored_length
    FILTER ( ?total_cored_length > 30 )
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

16.2 SPARQL Query ./016/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore ?total_cored_length
WHERE
  { ?w    a                     :Wellbore ;
          :name                 ?wellbore ;
          :hasTotalCoreLength       ?tcl .
    ?tcl  :valueInStandardUnit  ?total_cored_length
    FILTER ( ?total_cored_length > 30 )
  }

16.3 SPARQL Query ./016/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore ?total_cored_length ?strat_unit_name ?top_md ?bot_md
WHERE
  { ?w    a                     :Wellbore ;
          :name                 ?wellbore ;
          :hasTotalCoreLength       ?tcl .
    ?tcl  :valueInStandardUnit  ?total_cored_length
    FILTER ( ?total_cored_length > 30 )
    OPTIONAL
      { ?w        :hasWellboreInterval  ?strat_zone .
        ?strat_zone  a                  :StratigraphicZone ;
                  :hasUnit              ?strat_unit ;
                  :hasTopDepth  ?top ;
                  :hasBottomDepth  ?bot .
        ?strat_unit  :name              ?strat_unit_name .
        ?top      a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?top_md .
        ?bot      a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?bot_md
      }
  }

17 Information Need 017

Return set where: CORE INTERVAL TOP M > 3000 AND
CORE STRAT INTERSECT UNITS LIKE ’%HUGIN%’

## DOMAIN: well, stratigraphy
# The "TOP" is interpreted as the measured depth of the top of the
# core.
# The "SET" is unclear how much information is wanted, probably more
# than the bare minimum given in 01.q
# 02.q also gives the stratigraphy overlapping with the core

17.1 SPARQL Query ./017/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "HUGIN", "i")
    ?interval  :hasTopDepth  ?top .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_depth_md
    FILTER ( ?top_depth_md > 3000 )
  }

17.2 SPARQL Query ./017/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "HUGIN", "i")
    ?interval  :hasTopDepth  ?top .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_depth_md
    FILTER ( ?top_depth_md > 3000 )
    OPTIONAL
      { ?interval  :overlapsWellboreInterval  ?strat_zone .
        ?strat_zone  :hasUnit           ?strat_unit ;
                  :hasTopDepth  ?zone_top ;
                  :hasBottomDepth  ?zone_bot .
        ?strat_unit  :name              ?strat_unit_name .
        ?zone_top  :valueInStandardUnit  ?zone_top_md_m ;
                  a                     :MeasuredDepth .
        ?zone_bot  :valueInStandardUnit  ?zone_bot_md_m ;
                  a                     :MeasuredDepth
      }
  }
ORDER BY ?c

18 Information Need 018

Show the wellbores completed after 2008 where Statoil as drilling operator
sampled more than 50 m of core(s).

## DOMAIN: well
## "after 2008" is interpreted as "on or after January 1 2009"

18.1 SPARQL Query ./018/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :completionDate       ?cmpl ;
              :hasTotalCoreLength       ?total_cored .
    ?total_cored  a                 :TotalCoreLength
    FILTER ( ?cmpl > "2008-12-31" )
    ?total_cored  :valueInStandardUnit  ?total_core_m
    FILTER ( ?total_core_m > 50 )
  }

19 Information Need 019

Show the wellbores completed before 2008 where Statoil as drilling oper-
ator sampled less than 10 m of core(s).

## DOMAIN: well

20 Information Need 020

Where are all the cores intersecting the Cook Formation with higher than
normal porosity with respect to burial depth and does this correlate with
trends in any other related data.

## DOMAIN: well, stratigraphy

21 Information Need 021

Show me all wells with cores belonging the stratigraphic unit xxx.

## DOMAIN: well, stratigraphy

21.1 SPARQL Query ./021/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?uName
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "Tarbert", "i")
  }

22 Information Need 022

RETURN gis enabled table
Wellbore, strat unti, gross thickness, net thickness, net to gross ratio,
porosity statistics (mean, mode, min, P10, P90, max), other wellbore log
statistics, dephs
BASED ON
wellbore logs (treated using alias and priority), stratigraphic units and net
cut off thresholds (Compare with core sample analysis)

## DOMAIN: well, stratigraphy
# The wellbore logs are in openworks and/or recall. 
# The meaning of "based on" is unclear, but since calculation is
# probably out of scope for Optique, we interpret it just as the
# list of relevant data sources
# Porosity statistics are precalculated in the database and should 
# probably be extracted, not calculated
#
# We dont yet understand exactly what gross and net thickness are.
# It may be that gross thickness is just the length of the part of the
# wellbore that intersects the unit, that is, the difference betwen
# top and bottom. Net thickness appears to also take the angle between
# the wellbore and the stratigraphic layer into account

22.1 SPARQL Query ./022/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wName ?sample ?porosity ?top_depth_md ?bot_depth_md
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wName ;
              :hasWellboreInterval  ?z .
    ?z        :hasUnit              ?u .
    ?u        :name                 ?strat_unit_name .
    ?wellbore  :hasWellboreInterval  ?cored_int .
    ?c        :extractedFrom        ?cored_int ;
              :hasCoreSample        ?sample .
    ?sample   :hasDepth  ?sample_depth .
    ?sample_depth
              :inWellboreInterval   ?z .
    ?sample   :hasPorosity  ?p .
    ?p        :valueInStandardUnit  ?porosity .
    ?z        :hasTopDepth  ?top .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_depth_md .
    ?z        :hasBottomDepth  ?bot .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?bot_depth_md
  }

23 Information Need 023

OUTPUT gis enabled table showing
statisics including min, max, mode, P10,P50,P75,P90 for core porosity
and core permeability referenced with intersecting stratigraphic unit and
with measures on sample location in x,y, z, MD RKB m, TVD MSL m,
TVD GS

## DOMAIN: well, stratigraphy

## I'm not sure we can actually get at the sample location in
##   x,y,z. We might have to calculate that from the well-header x,y
##   and the path of the wellbore, which is quite hard.

23.1 SPARQL Query ./023/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wName ?sample ?porosity ?top_depth_md
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wName ;
              :hasWellboreInterval  ?z .
    ?z        :hasUnit              ?u .
    ?u        :name                 ?strat_unit_name .
    ?wellbore  :hasWellboreInterval  ?cored_int .
    ?c        :extractedFrom        ?cored_int ;
              :hasCoreSample        ?sample .
    ?sample   :hasDepth  ?sample_depth .
    ?sample_depth
              :inWellboreInterval   ?z ;
              :hasDepth  ?sample_depth_md ;
              :hasDepth  ?sample_depth_tvd .
    ?sample_depth_md
              a                     :MeasuredDepth ;
              :valueInStandardUnit  ?sample_depth_md_m .
    ?sample_depth_tvd
              a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?sample_depth_tvd_m .
    ?sample   :hasPorosity  ?p .
    ?p        :valueInStandardUnit  ?porosity .
    ?z        :hasTopDepth  ?top_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_depth_md .
    ?z        :hasTopDepth  ?bot_md .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_depth_md .
    ?z        :hasTopDepth  ?top_tvd .
    ?top_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_depth_tvd .
    ?z        :hasBottomDepth  ?bot_tvd .
    ?bot_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?bot_depth_tvd
  }

24 Information Need 024

SHOW gis enabled table
showing Wellbore name, core id, ..., core top depth, core base, depth,
stratigraphy intersected, url to core photo
User will be able to filter using stratigraphic unit names

## DOMAIN: well, stratigraphy, core, core photo

## Core photos are not modelled or mapped yet (Sept 2015)

24.1 SPARQL Query ./024/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wName ;
              :hasWellboreInterval  ?cored_int .
    ?c        :extractedFrom        ?cored_int .
    ?cored_int  :hasTopDepth  ?top_md ;
              :hasBottomDepth  ?bot_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_md_m .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?bot_md_m
    OPTIONAL
      { ?z  :overlapsWellboreInterval  ?cored_int ;
            :hasUnit              ?u .
        ?u  :name                 ?strat_unit_name
      }
    OPTIONAL
      { ?cored_int  :hasTopDepth  ?top_tvd ;
                  :hasBottomDepth  ?bot_tvd .
        ?top_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?top_tvd_m .
        ?bot_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?bot_tvd_m
      }
  }

25 Information Need 025

RETURN gis enabled table
wellbore, strat unit, fluid type, relevant pressure parameters including
quality indicators and TVD MSL, MD RKB
Example of further question
RETURN wellbore, strat, mean pressure by stratigraphic unit, depths,
fluid type

## DOMAIN: well, stratigraphy, pressure

## Pressure is mainly not in slegge, but in geochem and
   coredb. This query will not give answers till we have integrated those
   data sources
## 02.q is a slight variation of 01.q using temperature in stead of
   pressure. This is not exacctly in the formulation, but so similar
   we added it, since it's more suited for testing federation
   (Temperature is not in slegge.)

25.1 SPARQL Query ./025/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?z ;
              :name                 ?wellbore_name .
    ?z        :hasUnit              ?strat_unit .
    ?strat_unit  :name              ?strat_unit_name .
    ?w        :hasFormationPressure  ?p .
    ?p        :hasDepth  ?p_depth .
    ?p_depth  a                     :MeasuredDepth ;
              :inWellboreInterval   ?z ;
              :valueInStandardUnit  ?pressure_depth_md_m .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos ;
              :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
  }

25.2 SPARQL Query ./025/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?z ;
              :name                 ?wellbore_name .
    ?z        :hasUnit              ?strat_unit .
    ?strat_unit  :name              ?strat_unit_name .
    ?t        a                     :Temperature ;
              :valueInStandardUnit  ?temp ;
              :hasDepth  ?t_depth .
    ?t_depth  :inWellboreInterval   ?z ;
              a                     :MeasuredDepth ;
              :valueInStandardUnit  ?temp_depth_md_m .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
  }

26 Information Need 026

For my sub set of wells and unit A (II)
Return the wellbores (I) that penetrates stratigraphic unit A (II) and
lateral analogues with all details of the penetrated section (including TVD
MSL, MD RKB,.(III))
Also return the wellbores that do not penetra

## DOMAIN: well, stratigraphy

# I think these are two queries, the first paragraph a conjunctive
  query, while the second one includes a negation. THese are modelled
  in 01.q and 02.q. 

# We do not yet know
  exactly what "lateral analogues" are. It may mean sub-units /
  child-nodes in the "tree" of the stratiigraphic column.

26.1 SPARQL Query ./026/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wName ;
           :hasWellboreInterval  ?z .
    ?z     :hasUnit              ?u .
    ?u     :name                 ?strat_unit_name .
    ?z     :hasTopDepth  ?top .
    ?top   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?top_depth_md_m .
    ?z     :hasBottomDepth  ?bot .
    ?bot   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?bot_depth_md_m .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    OPTIONAL
      { ?z        :hasTopDepth  ?top_tvd .
        ?top_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?top_depth_tvd_m .
        ?z        :hasBottomDepth  ?bot_tvd .
        ?bot_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?bot_depth_tvd_m
      }
  }

26.2 SPARQL Query ./026/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wName
    FILTER NOT EXISTS { ?w  :hasWellboreInterval  ?z .
                        ?z  :hasUnit              ?u .
                        ?u  :name                 ?strat_unit_name
                        FILTER regex(?strat_unit_name, "Tarbert")
                      }
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long
  }

27 Information Need 027

For my wellbore sub set
Return the the wells containing a full set of standard names for all input
logs in a list, e.g.:
Porosity (PHIF),
Gamma ray (GR),
Shale volume (VSH)
in
the a defined strat unit, e.g. Tarbert Formation and it’s lateral equ

## DOMAIN: well, stratigraphy

## The logs are in openworks and recall, 
## so the query 03.q, which takes them into account will only work
## with federation
## It's not clear what "input logs" mean, but I have interpreted it 
## as a list of names of measurement types.

## The abbreviated names in capitals corespond to the column
   LOG_CRV_NAME in LOG_CURVE_HEADER in OpenWorks

27.1 SPARQL Query ./027/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?uName
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "Tarbert", "i")
  }

27.2 SPARQL Query ./027/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?ci .
    ?c     :extractedFrom        ?ci .
    ?ci    :hasTopDepth  ?top .
    ?c     :hasCoreSample        ?s .
    ?s     :name                 ?sample_name .
    ?top   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?top_depth .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
    OPTIONAL
      { ?s  :hasPermeability  ?p .
        ?p  :valueInOriginalUnit  ?permeability
      }
  }

27.3 SPARQL Query ./027/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore_name ;
           :hasWellboreInterval  ?zone .
    ?zone  :hasUnit              ?u .
    ?u     :name                 ?uName
    FILTER regex(?uName, "Tarbert", "i")
    ?zone     :overlapsWellboreInterval  ?logged_interval1 .
    ?logged_interval1
              :hasLogCurve          ?log1 .
    ?log1     :logCurveNameShort    ?curve_name1 .
    ?zone     :overlapsWellboreInterval  ?logged_interval2 .
    ?logged_interval2
              :hasLogCurve          ?log2 .
    ?log2     :logCurveNameShort    ?curve_name2 .
    ?zone     :overlapsWellboreInterval  ?logged_interval3 .
    ?logged_interval3
              :hasLogCurve          ?log3 .
    ?log3     :logCurveNameShort    ?curve_name3
    FILTER ( ( ( ?curve_name1 = "PHIF" ) && ( ?curve_name2 = "GR" ) ) && ( ?curve_name3 = "VSH" ) )
  }

28 Information Need 028

Compare the lithostrat column and picks between databases
With optional input constraints filter like the below:
- lithostrat column: Field scale; basin scale
- chronostrat
- lithostrat unit
- strat unit top or base: top; base
- spatial: region by name

## DOMAIN: well, stratigraphy
## COMMENT: Out of scope? Needs provenance filtering

## Since we have not had federation, we have not made SPARQL of this
   query. We also dont understand exactly what is mean by comparing the
   columns, and by "Field scale". A possible interpretation is to
   show the depths at which different stratigraphic are said to
   occur in different data sources.

28.1 SPARQL Query ./028/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :hasWellboreInterval  ?zone .
    ?zone  :hasUnit              ?u ;
           :hasTopDepth  ?top ;
           :hasBottomDepth  ?bot .
    ?top   a                     :MeasuredDepth .
    ?bot   a                     :MeasuredDepth .
    ?top   :valueInStandardUnit  ?top_md_m .
    ?bot   :valueInStandardUnit  ?bot_md_m .
    ?u     :name                 ?unit_name
  }
ORDER BY ?unit_name ?w

29 Information Need 029

Return polygons with access level for all seismic data that the company
has got rights to, but that is not loaded to the project database in question.
And return navigation outlines where we do not have access
What processing volumes exists for a surv

## DOMAIN: seismic, legal
## We have not modelled or been accessing seismic data or metadata

30 Information Need 030

Identify
Existing seismic that Statoil do not own
Existing seismic that Statoil own, but that is not loaded into the project
from
Petrobank.
This is seismic where Company access is None or Some

## DOMAIN: seismic, legal
## We have not treated seismic yet, neither in ontology or data.

31 Information Need 031

Show the data acquisition program for wells
BASED ON subset of wells in some result set that may be filtered and
visualized in a map.
Include proper links.

## DOMAIN: well
## We do not know what the "data acquisition program" is

32 Information Need 032

What are the core sampe analysis permeabilities in Vestland Group or
Brent lithostratigraphic equivalent Brent Group at vertical sediment depth
exceeding 3500 m

## DOMAIN: stratigraphy, permeability

32.1 SPARQL Query ./032/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore_name ;
         :hasWellboreInterval  ?wi .
    ?c   a                     :Core ;
         :extractedFrom        ?wi .
    ?wi  :overlapsWellboreInterval  ?z .
    ?z   :hasUnit              ?u .
    ?u   :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p .
    ?p  :valueInOriginalUnit  ?permeability
  }

32.2 SPARQL Query ./032/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore_name ;
         :hasWellboreInterval  ?wi .
    ?c   a                     :Core ;
         :extractedFrom        ?wi .
    ?wi  :overlapsWellboreInterval  ?z .
    ?z   :hasUnit              ?u .
    ?u   :name                 ?uName
    FILTER regex(?uName, "(Brent)|(Vestland)")
    ?c        :hasCoreSample        ?s .
    ?s        :hasPermeability  ?p .
    ?p        :valueInOriginalUnit  ?permeability .
    ?s        :hasDepth  ?sample_depth_tvd .
    ?sample_depth_tvd
              a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?sample_depth_tvd_m
    FILTER ( ?sample_depth_tvd_m > 3500 )
  }

32.3 SPARQL Query ./032/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore_name ;
         :hasWellboreInterval  ?wi .
    ?c   a                     :Core ;
         :extractedFrom        ?wi .
    ?wi  :overlapsWellboreInterval  ?z .
    ?z   :hasUnit              ?u .
    ?u   :name                 ?uName
    FILTER regex(?uName, "(Brent)|(Vestland)")
    ?c        :hasCoreSample        ?s .
    ?s        :hasPermeability  ?p .
    ?p        :valueInOriginalUnit  ?permeability .
    ?s        :hasDepth  ?sample_depth_tvd .
    ?sample_depth_tvd
              a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?sample_depth_tvd_m
    FILTER ( ?sample_depth_tvd_m > 3500 )
  }

33 Information Need 033

Show seismic data where a company has been granted access to after
a given date in PetroBank. Input parameter should be Company and
from date

## DOMAIN: seismic

34 Information Need 034

Which wells do not have a spesific data type (e.g. “well completion re-
port”, core data, directional data, etc)

## DOMAIN: well

34.1 SPARQL Query ./034/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w  a                     :Well ;
        :hasWellbore          ?wlb
    FILTER NOT EXISTS { ?wlb   :hasWellboreInterval  ?int .
                        ?core  :extractedFrom        ?int
                      }
  }

35 Information Need 035

Are two surveys equal though they have different names and/or outlines?

## DOMAIN: seismic

36 Information Need 036

Are two wells equal though they have different names?

## DOMAIN: well

37 Information Need 037

I need Well, Wellbore, Wellbore Path, Wellbore Cored Interval, Well-
bore Stratigraphy, Core Samples, Sample Analysis, Analysis Permeability,
Analysis Porosity to be integrated in such a way that:
It is possible to have a result set containing all important attributes in-
cluding location.
The result set can be filtered by stratigraphy, wellbore name and the other
attributes.
It should be possible to cross plot permeability vs. porosity vs. depth
(MD RKB, TVD MSL, TVD below sea bottom).
TVD values can be extracted by using the MD RKB values along 3D
wellbore pathes.
It should be possible to identify which cores exist in / are missing in either
EPDS or NPD or Petrobank.
It should be possible to identify which data we have access to that is not
loaded into EPDS

## DOMAIN: well, stratigraphy, permeability, depth, core
# Cleaner version
# Author: Dag Hovland
# Time: 2014-05-23
Input: List of well/wellbore names and stratigraphic units, whether to include child units? Minimum or maximum permeability, minimum or maximum porosity
Output: Output wellbore intervals with the given stratigraphic units, including child units are interpreted. Give all cores taken in overlapping intervals, give permeability, porosity measurements taken in the intervals, output measured depth from rkb and true vertical depth from sea level and sea bottom of the intervals. For the cores also list if they are stored in npd, epds, or both.
Output: Output wellbore intervals with the children of the given strat units are interpreted. Give all cores taken in overlapping intervals, give permeability, porosity measurements taken in the intervals, output measured depth from rkb and true vertical depth from sea level and sea bottom of the intervals. For the cores also list if they are stored in npd, epds, or both.


#Abstract SPARQL query not relating to specific ontology

SELECT ?wellbore ?strat_zone ?strat_unit ?child_strat_unit ?core_number ?data_source ?top_depth_md ?bottom_depth_md ?top_depth_tvd_msl ?bottom_depth_tvd_msl  ?top_depth_tvd_bsb ?bottom_depth_tvd_bsb ?net_thickness ?gross_thickness WHERE {
       ?w a :Wellbore;
          :name ?wellbore;
          :hasWellboreInterval ?strat_zone.
       ?strat_zone a :StratigraphicZone;
                   :hasUnit ?su.
       ?su :name ?strat_unit.
       OPTIONAL { ?su :hasChildUnit ?sc. ?sc : name ?child_strat_unit.}
       OPTIONAL { ?strat_zone :overlapsWellboreInterval ?ci. ?core :extractedFrom ?ci; :coreNumber ?core_number; :fromDataSource ?data_source.}
       OPTIONAL {?r :hasPermeability ?permeability.}
       OPTIONAL {?r :hasPorosity ?porosity.}
       OPTIONAL {?r :hasTopDepth [a :MeasuredDepthRKB; :hasValue ?top_depth_md].}
       OPTIONAL {?r :hasBottomDepth [a :MeasuredDepthRKB; :hasValue ?bottom_depth_md].}
       OPTIONAL {?r :hasTopDepth [a :TrueVerticalDepthMSL; :hasValue ?top_depth_tvd_msl].}
       OPTIONAL {?r :hasBottomDepth [a :TrueVerticalDepthMSL; :hasValue ?bottom_depth_tvd_msl].}
       OPTIONAL {?r :hasTopDepth [a :TrueVerticalDepthBelowSeaBottom; :hasValue ?top_depth_tvd_bsb].}
       OPTIONAL {?r :hasBottomDepth [a :TrueVerticalDepthBelowSeaBottom; :hasValue ?bottom_depth_tvd_bsb].}
       OPTIONAL {?r :hasNetToGrossRatio ?ntg.}		
       OPTIONAL {?r :hasNetThickness [:hasValue ?net_thickness].}
       OPTIONAL {?r :hasGrossThickness [:hasValue ?gross_thickness].}
       
}

37.1 SPARQL Query ./037/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wName ;
           :hasWellboreInterval  ?wi .
    ?c     :extractedFrom        ?wi .
    ?wi    :overlapsWellboreInterval  ?z .
    ?z     :hasUnit              ?u .
    ?u     :name                 ?unit_name .
    ?c     :hasCoreSample        ?s .
    ?s     :name                 ?core_sample_name ;
           :hasPermeability  ?p .
    ?p     :valueInOriginalUnit  ?permeability .
    ?wi    :hasTopDepth  ?td .
    ?td    a                     :MeasuredDepth ;
           :valueInOriginalUnit  ?top_depth .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

37.2 SPARQL Query ./037/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p ;
        :name                 ?sample_name .
    ?p  :valueInStandardUnit  ?permeability
  }

37.3 SPARQL Query ./037/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?uName
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "Tarbert", "i")
  }

37.4 SPARQL Query ./037/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wName ;
           :hasWellboreInterval  ?wi .
    ?c     :extractedFrom        ?wi .
    ?wi    :overlapsWellboreInterval  ?z .
    ?z     :hasUnit              ?u .
    ?u     :name                 ?unit_name .
    ?c     :hasCoreSample        ?s .
    ?s     :name                 ?core_sample_name ;
           :hasPermeability  ?p .
    ?p     :valueInOriginalUnit  ?permeability .
    ?wi    :hasTopDepth  ?tmd .
    ?tmd   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?top_md .
    ?wi    :hasTopDepth  ?ttvd .
    ?ttvd  a                     :TrueVerticalDepth ;
           :valueInStandardUnit  ?top_tvd .
    ?wi    :hasBottomDepth  ?bmd .
    ?bmd   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?bot_md .
    ?wi    :hasBottomDepth  ?btvd .
    ?btvd  a                     :TrueVerticalDepth ;
           :valueInStandardUnit  ?bot_tvd
  }

37.5 SPARQL Query ./037/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wName ;
           :hasWellboreInterval  ?wi .
    ?c     :extractedFrom        ?wi .
    ?wi    :overlapsWellboreInterval  ?z .
    ?z     :hasUnit              ?u .
    ?u     :name                 ?unit_name .
    ?c     :hasCoreSample        ?s .
    ?s     :name                 ?core_sample_name .
    ?wi    :hasTopDepth  ?tmd .
    ?tmd   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?top_md .
    ?wi    :hasTopDepth  ?ttvd .
    ?ttvd  a                     :TrueVerticalDepth ;
           :valueInStandardUnit  ?top_tvd .
    ?wi    :hasBottomDepth  ?bmd .
    ?bmd   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?bot_md .
    ?wi    :hasBottomDepth  ?btvd .
    ?btvd  a                     :TrueVerticalDepth ;
           :valueInStandardUnit  ?bot_tvd
    OPTIONAL
      { ?s  :hasPermeability  ?p .
        ?p  :valueInOriginalUnit  ?permeability
      }
    OPTIONAL
      { ?s    :hasPorosity  ?por .
        ?por  :valueInStandardUnit  ?porosity
      }
  }

37.6 SPARQL Query ./037/06.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?c1 ?c2 ?c3 ?c8 ?c4 ?c6 ?c9 ?a3 ?c5 ?a1 ?c7 ?a2 ?c10
WHERE
  { ?c1   a                     :Wellbore .
    ?c2   a                     :WellboreInterval .
    ?c3   a                     :Core .
    ?c8   a                     :WellboreInterval .
    ?c4   a                     :CoreSample .
    ?c6   a                     :CoreSample .
    ?c9   a                     :StratigraphicUnit .
    ?c5   a                     :Permeability .
    ?c7   a                     :Porosity .
    ?c10  a                     :StratigraphicColumn ;
          a                     :LithoStratigraphicColumn .
    ?c1   :hasWellboreInterval  ?c2 .
    ?c2  ^:extractedFrom ?c3 .
    ?c2  :overlapsWellboreInterval  ?c8 .
    ?c3  :hasCoreSample        ?c4 ;
         :hasCoreSample        ?c6 .
    ?c8  :hasUnit              ?c9 .
    ?c4  :hasPermeability  ?c5 .
    ?c6  :hasPorosity  ?c7 .
    ?c9  :ofStratigraphicColumn  ?c10 ;
         :name                 ?a3 .
    ?c5  :valueInStandardUnit  ?a1 .
    ?c7  :valueInOriginalUnit  ?a2
    FILTER regex(?a3, ".*NORDLAND.*")
  }

37.7 SPARQL Query ./037/07.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?c1 ?c2 ?c8
WHERE
  { ?c1  a                     :Wellbore .
    ?c2  a                     :WellboreInterval .
    ?c8  a                     :WellboreInterval .
    ?c1  :hasWellboreInterval  ?c2 .
    ?c2  :overlapsWellboreInterval  ?c8
  }
LIMIT   100

38 Information Need 038

Want to have the possibility to say that they want all wells in one block
Specify search by location by quadrants (”quad”) and block. E.g Load all
well data withing ”quad” 34 and ”quad” 35

## DOMAIN: well, block

39 Information Need 039

Example query: Within quad 35 , find me all wells which have total
depth of more than 3000 meters or rec pressure of 200 bars or types of
stratigraphic units or sand

## DOMAIN: well, pressure, depth, stratigraphy

40 Information Need 040

Would like a map that shows the outline of surveys with boundaries , hard
to find, should think it is a db for this seismic data, but it is not

## DOMAIN: seismic

41 Information Need 041

Project data managers (PDMs) find the seismic data for the geologists as
it is pt (?). [Expert] would like a map that shows the outline of surveys
with boundaries, hard to find, should think it is a db for this seismic
data, but it is not. Wish: show surveys in quadrant block. For example:
[Expert] wants to have surveys in quad X block Y shot from 1990 from
company A, if it is what he wants he would ask someone to load the data
for him. No DB that show what seismic is in which blocks.

## DOMAIN: seismic, block, quadrant

42 Information Need 042

For example find all wells in block X that took more than 30 days to drill,
and had problems that resulted in blowouts,

## DOMAIN: well, block, drill

43 Information Need 043

Wants to go to quadrants, and blocks in quadrants, and then for example
take all exploration wellbores, litostratographic unit in certain area, ...

## DOMAIN: well, quadrant, stratigraphy

43.1 SPARQL Query ./043/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability ?lat ?long
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name ;
        :hasWellboreInterval  ?interval
    FILTER regex(?wellbore_name, "NO 34")
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName .
    ?c        :hasCoreSample        ?s .
    ?s        :hasPermeability  ?p ;
              :name                 ?sample_name .
    ?p        :valueInStandardUnit  ?permeability .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

43.2 SPARQL Query ./043/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?core_sample_name ?permeability
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name
    FILTER regex(?wellbore_name, "NO 34")
    ?w  :hasWellboreInterval  ?wi .
    ?c  :extractedFrom        ?wi ;
        :hasCoreSample        ?s .
    ?s  :name                 ?core_sample_name
    OPTIONAL
      { ?s  :hasPermeability  ?p .
        ?p  :valueInStandardUnit  ?permeability
      }
  }

44 Information Need 044

NTG (Net-to-gross)ratio sand to non-sand , this is a number stored in db,
if you plot this in every well, it is a powerful tool, NTG net to gross ratio,
and porosity, permeability, depth is important

## DOMAIN: well, depth, net-to-gross, permeability, depth, porosity

45 Information Need 045

all wells that go beneath 3000 meter mark

## DOMAIN: well, depth

46 Information Need 046

Drill a well in jurassic, net to gross of 50%, they want to know how deep
is it, is it at 3000m or 10000m, who supplied the rig, and who drilled

## DOMAIN: well, stratigraphy, drill, depth

47 Information Need 047

Fetch all the cores that intersect a well (not very sure about the exact
concepts wells/cores but sure about the well depth) [could be stratigraphic
layer, if memory serves]. XYZ geometries used.

## DOMAIN: well, core, stratigraphy

48 Information Need 048

Give me a lis of measurements of wellbore cores, together with the true
vertical depth of the top of the core

## DOMAIN: well, core, depth

48.1 SPARQL Query ./048/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?core_sample_name ?permeability ?top_depth_tvd_m
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name
    FILTER regex(?wellbore_name, "NO 34")
    ?w        :hasWellboreInterval  ?wi .
    ?c        :extractedFrom        ?wi ;
              :hasCoreSample        ?s .
    ?s        :name                 ?core_sample_name ;
              :hasPermeability  ?p .
    ?p        :valueInStandardUnit  ?permeability .
    ?wi       :hasTopDepth  ?top_depth .
    ?top_depth  a                   :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_depth_tvd_m
  }

48.2 SPARQL Query ./048/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?core_sample_name ?permeability ?top_depth_tvd_m
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name
    FILTER regex(?wellbore_name, "NO 34")
    ?w        :hasWellboreInterval  ?wi .
    ?c        :extractedFrom        ?wi ;
              :hasCoreSample        ?s .
    ?s        :name                 ?core_sample_name ;
              :hasPermeability  ?p .
    ?p        :valueInStandardUnit  ?permeability .
    ?c        :hasCoreSample        ?s2 .
    ?s2       :hasPorosity  ?por .
    ?por      :valueInStandardUnit  ?porosity .
    ?wi       :hasTopDepth  ?top_depth .
    ?top_depth  a                   :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_depth_tvd_m
  }

48.3 SPARQL Query ./048/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?core_sample_name ?permeability ?porosity ?top_depth_tvd_m
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name
    FILTER regex(?wellbore_name, "NO 34")
    ?w        :hasWellboreInterval  ?wi .
    ?c        :extractedFrom        ?wi .
    ?wi       :hasTopDepth  ?top_depth .
    ?top_depth  a                   :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_depth_tvd_m
    OPTIONAL
      { ?c  :hasCoreSample        ?s .
        ?s  :name                 ?core_sample_name ;
            :hasPermeability  ?p .
        ?p  :valueInStandardUnit  ?permeability
      }
    OPTIONAL
      { ?c    :hasCoreSample        ?s2 .
        ?s    :hasPorosity  ?por .
        ?por  :valueInStandardUnit  ?porosity
      }
  }

49 Information Need 049

for a given stratigraphic unit, give me the measureements from all cores
intersecting such a layer, together with the top depth of the layer it inter-
sects

## DOMAIN: stratigraphy, core, depth, well

50 Information Need 050

I need Well, Wellbore, Wellbore Path, Wellbore Cored Interval, Wellbore Stratigraphy,
Core Samples, Sample Analysis, Analysis Permeabi and identify which
data we have access to that is not loaded into Slegge

## DOMAIN: well, core, stratigraphy, permeability

50.1 SPARQL Query ./050/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p ;
        :name                 ?sample_name .
    ?p  :valueInStandardUnit  ?permeability
  }

50.2 SPARQL Query ./050/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    OPTIONAL
      { ?c  :hasCoreSample        ?s .
        ?s  :hasPermeability  ?p ;
            :name                 ?sample_name .
        ?p  :valueInStandardUnit  ?permeability
      }
  }

50.3 SPARQL Query ./050/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability ?top_md_m ?bot_md_m ?top_tvd_m ?bot_tvd_m
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p ;
        :name                 ?sample_name .
    ?p  :valueInStandardUnit  ?permeability
    OPTIONAL
      { ?interval  :hasTopDepth  ?top_md .
        ?top_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?top_md_m
      }
    OPTIONAL
      { ?interval  :hasBottomDepth  ?bot_md .
        ?bot_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?bot_md_m
      }
    OPTIONAL
      { ?interval  :hasTopDepth  ?top_tvd .
        ?top_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?top_tvd_m
      }
    OPTIONAL
      { ?interval  :hasBottomDepth  ?bot_tvd .
        ?bot_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?bot_tvd_m
      }
  }

50.4 SPARQL Query ./050/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability ?top_md_m ?bot_md_m ?top_tvd_m ?bot_tvd_m
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    OPTIONAL
      { ?c  :hasCoreSample        ?s .
        ?s  :hasPermeability  ?p ;
            :name                 ?sample_name .
        ?p  :valueInStandardUnit  ?permeability
      }
    OPTIONAL
      { ?interval  :hasTopDepth  ?top_md .
        ?top_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?top_md_m
      }
    OPTIONAL
      { ?interval  :hasBottomDepth  ?bot_md .
        ?bot_md   a                     :MeasuredDepth ;
                  :valueInStandardUnit  ?bot_md_m
      }
    OPTIONAL
      { ?interval  :hasTopDepth  ?top_tvd .
        ?top_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?top_tvd_m
      }
    OPTIONAL
      { ?interval  :hasBottomDepth  ?bot_tvd .
        ?bot_tvd  a                     :TrueVerticalDepth ;
                  :valueInStandardUnit  ?bot_tvd_m
      }
  }

51 Information Need 051

For a set of wells and a stratigraphic unit, return mean pressure grouped
by stratigraphic unit

## DOMAIN: well, stratigraphy pressure

51.1 SPARQL Query ./051/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?formation_pressure
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore ;
         :hasFormationPressure  ?fp .
    ?fp  :valueInStandardUnit  ?formation_pressure
  }

51.2 SPARQL Query ./051/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure .
    ?wi    :hasTopDepth  ?top ;
           :hasBottomDepth  ?bot ;
           a                     :StratigraphicZone ;
           :name                 ?stratigraphic_zone ;
           :hasUnit              ?strat_unit .
    ?top   a                     :MeasuredDepth .
    ?bot   a                     :MeasuredDepth .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

51.3 SPARQL Query ./051/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?wi ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

51.4 SPARQL Query ./051/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  :inWellboreInterval  ?wi .
    ?wi       :hasUnit              ?unit ;
              :overlapsWellboreInterval  ?logged .
    ?logged   :hasLogCurve          ?curve
  }

51.5 SPARQL Query ./051/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  :inWellboreInterval  ?wi .
    ?wi       :hasUnit              ?unit ;
              :overlapsWellboreInterval  ?logged .
    ?logged   :hasLogCurve          ?curve
  }

52 Information Need 052

Return gross thickness, net thickness, logs and analysis, net to gross ratio,
porosity statistics (mean, mode, min, P10, P90, max), other wellbore log
statistics from wellbore logs (treated using alias and priority) and net
cut off thresholds WHERE stratigraphic interval is a filter Also return
information on what data is missing and where that may be taken from
in order to do the

## DOMAIN: thickness, well, net-to-gross, porosity, stratigraphy

53 Information Need 053

Find all stratigraphic units overlapping an interval with fluid, and vice versa.

## DOMAIN: well, stratigraphy, fluid

54 Information Need 054

stratigraphic zones with net-to-gross > 0

## DOMAIN: depth, stratigraphy, well, net-to-gross

55 Information Need 055

all wellbores penetrating the Tarbert formation

## DOMAIN: well, stratigraphy

56 Information Need 056

Give formation pressure, net-to-gross ratio, fluid content, and overlapping stratigraphy for a fluid zone / reservoir

## DOMAIN: pressure, well, stratigraphy, fluid

56.1 SPARQL Query ./056/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?fluid ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :FluidZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit ;
              :fluidZoneContent     ?fluid .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit
    FILTER ( ( ?strat_zone_entry <= ?pressure_depth ) && ( ?strat_zone_exit >= ?pressure_depth ) )
  }

56.2 SPARQL Query ./056/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?fluid ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth ?os
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :FluidZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit ;
              :fluidZoneContent     ?fluid ;
              :overlapsWellboreInterval  ?oz .
    ?oz       :hasUnit              ?os .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit
    FILTER ( ( ?strat_zone_entry <= ?pressure_depth ) && ( ?strat_zone_exit >= ?pressure_depth ) )
  }

57 Information Need 057

Give formation pressure, net-to-gross ratio, gross thickness, net thickness, fluid content, for all fluid zones / reservoirs overlapping with a given stratigraphic unit

## DOMAIN: pressure, thickness, fluid
Give formation pressure, net-to-gross ratio, gross thickness, net thickness, fluid content, for all fluid zones / reservoirs overlapping with a given stratigraphic unit




SELECT ?wellbore ?reservoir ?formation_pressure ?top_depth_md ?bottom_depth_md ?net_thickness ?gross_thickness ?fluid_content WHERE {
       ?w a :Wellbore;
          :name ?wellbore;
          :hasWellboreInterval ?strat_zone.
       ?strat_zone a :StratigraphicZone;
                   :hasUnit ?su.
		   :overlapsWellboreInterval ?reservoir.
       ?su :name ?strat_unit.
       FILTER (?strat_unit = '<SOME NAME>').
       ?reservoir a :FluidZone.
       OPTIONAL {?reservoir :hasPermeability ?permeability.}
       OPTIONAL {?reservoir :hasFormationPressure ?formation_pressure.}
       OPTIONAL {?reservoir :hasPorosity ?porosity.}
       OPTIONAL {?reservoir :hasTopDepth [a :MeasuredDepthRKB; :hasValue ?top_depth_md].}
       OPTIONAL {?reservoir :hasBottomDepth [a :MeasuredDepthRKB; :hasValue ?bottom_depth_md].}
       OPTIONAL {?reservoir :hasNetToGrossRatio ?ntg.}		
       OPTIONAL {?reservoir :hasNetThickness [:hasValue ?net_thickness].}
       OPTIONAL {?reservoir :hasGrossThickness [:hasValue ?gross_thickness].}
       
}

57.1 SPARQL Query ./057/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :StratigraphicZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit
    FILTER ( ( ?strat_zone_entry <= ?pressure_depth ) && ( ?strat_zone_exit >= ?pressure_depth ) )
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

57.2 SPARQL Query ./057/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?fluid ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :FluidZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit ;
              :fluidZoneContent     ?fluid .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit
    FILTER ( ( ?strat_zone_entry <= ?pressure_depth ) && ( ?strat_zone_exit >= ?pressure_depth ) )
  }

57.3 SPARQL Query ./057/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure ;
           :hasDepth  ?fp_depth .
    ?wi    :hasTopDepth  ?top ;
           :hasBottomDepth  ?bot ;
           a                     :StratigraphicZone ;
           :name                 ?stratigraphic_zone ;
           :hasUnit              ?strat_unit .
    ?top   a                     :MeasuredDepth .
    ?bot   a                     :MeasuredDepth .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

57.4 SPARQL Query ./057/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure .
    ?wi    :hasTopDepth  ?top ;
           :hasBottomDepth  ?bot ;
           a                     :StratigraphicZone ;
           :name                 ?stratigraphic_zone ;
           :hasUnit              ?strat_unit .
    ?top   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?strat_zone_entry .
    ?bot   a                     :MeasuredDepth ;
           :valueInStandardUnit  ?strat_zone_exit .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

57.5 SPARQL Query ./057/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore ?wi ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2.6 ) ) && ( ?long < 2.7 ) )
  }

57.6 SPARQL Query ./057/06.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?formation_pressure ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure .
    ?wi    :hasTopDepth  ?top ;
           :hasBottomDepth  ?bot ;
           a                     :StratigraphicZone ;
           :name                 ?stratigraphic_zone ;
           :hasUnit              ?strat_unit .
    ?top   a                     :MeasuredDepth .
    ?bot   a                     :MeasuredDepth .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

57.7 SPARQL Query ./057/07.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?formation_pressure
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore ;
         :hasFormationPressure  ?fp .
    ?fp  :valueInStandardUnit  ?formation_pressure
  }

57.8 SPARQL Query ./057/08.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :StratigraphicZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit .
    ?fp_depth  :inWellboreInterval  ?wi .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

57.9 SPARQL Query ./057/09.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?stratigraphic_zone ?strat_zone_entry ?strat_zone_exit ?formation_pressure ?pressure_depth ?lat ?long ?wkt
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?wi ;
              :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              a                     :FormationPressure ;
              :hasDepth  ?fp_depth .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?pressure_depth .
    ?wi       :hasTopDepth  ?top ;
              :hasBottomDepth  ?bot ;
              a                     :StratigraphicZone ;
              :name                 ?stratigraphic_zone ;
              :hasUnit              ?strat_unit .
    ?top      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_entry .
    ?bot      a                     :MeasuredDepth ;
              :valueInStandardUnit  ?strat_zone_exit
    FILTER ( ( ?strat_zone_entry <= ?pressure_depth ) && ( ?strat_zone_exit >= ?pressure_depth ) )
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long ;
           :WKT          ?wkt
    FILTER regex(?stratigraphic_zone, "Tarbert Fm.", "i")
  }

58 Information Need 058

Show all Norwegian wells with cores in Brent with measured permeability
and where it is larger than a given value, e.g. 1 mD.

## DOMAIN: well, core, permeability

58.1 SPARQL Query ./058/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?sample_name ?uName ?permeability
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "BRENT", "i")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p ;
        :name                 ?sample_name .
    ?p  :valueInStandardUnit  ?permeability
    FILTER ( ?permeability > 1.0 )
  }

59 Information Need 059

Find out if there are cores in Brent which are not stored in Slegge (based
on NPD data)

## DOMAIN: well, core

60 Information Need 060

Give me a lis of measurements of wellbore cores, together with the true
vertical depth of the top of the core.


## DOMAIN: well, core, depth

60.1 SPARQL Query ./060/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?c ?top_tvd_m ?permeability ?porosity ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?int .
    ?c     a                     :Core ;
           :extractedFrom        ?int .
    ?int   :hasTopDepth  ?top .
    ?top   a                     :TrueVerticalDepth ;
           :valueInStandardUnit  ?top_tvd_m .
    ?c     :hasCoreSample        ?s .
    ?s     :hasPermeability  ?p .
    ?p     :valueInStandardUnit  ?permeability .
    ?c     :hasCoreSample        ?s2 .
    ?s2    :hasPorosity  ?por .
    ?por   :valueInStandardUnit  ?porosity .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

60.2 SPARQL Query ./060/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?c ?top_tvd_m ?permeability ?porosity ?lat ?long
WHERE
  { ?w     a                     :Wellbore ;
           :name                 ?wellbore ;
           :hasWellboreInterval  ?int .
    ?c     a                     :Core ;
           :extractedFrom        ?int .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
    OPTIONAL
      { ?int  :hasTopDepth  ?top .
        ?top  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_tvd_m
      }
    OPTIONAL
      { ?c  :hasCoreSample        ?s .
        ?s  :hasPermeability  ?p .
        ?p  :valueInStandardUnit  ?permeability
      }
    OPTIONAL
      { ?c    :hasCoreSample        ?s2 .
        ?s2   :hasPorosity  ?por .
        ?por  :valueInStandardUnit  ?porosity
      }
  }

60.3 SPARQL Query ./060/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?wellbore ?c ?top_tvd_m ?permeability ?lat ?long
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore ;
              :hasWellboreInterval  ?int .
    ?c        a                     :Core ;
              :extractedFrom        ?int .
    ?int      :hasTopDepth  ?top .
    ?top      a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_tvd_m .
    ?c        :hasCoreSample        ?s .
    ?s        :hasPermeability  ?p .
    ?p        :valueInStandardUnit  ?permeability .
    ?c        :hasCoreSample        ?s2 .
    ?s2       :hasPorosity  ?por .
    ?por      :valueInStandardUnit  ?porosity .
    ?w        :hasFormationPressure  ?fp .
    ?fp       :valueInStandardUnit  ?formation_pressure ;
              :hasDepth  ?fp_depth .
    ?int      :hasTopDepth  ?top_md ;
              :hasBottomDepth  ?bot_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_md_m .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?bot_md_m .
    ?fp_depth  a                    :MeasuredDepth ;
              :valueInStandardUnit  ?form_press_depth
    FILTER ( ( ?form_press_depth > ?top_md_m ) && ( ?form_press_depth < ?bot_md_m ) )
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 61 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

61 Information Need 061

For my sub set of wells, strat unit,given quality constraint (e.g. within II:
fluid type stdv in unit, or other quality measure). Return mean pressure
by stratigraphic unit, mean pressure vs depth (I) scatter plot coloured by
fluid type (II) for each unit mean overpressure (ref. hydrostatic) mean
overpressure vs depth scatter plot coloured by fluid type for each unit
pressure histogram for each group (by well and unit). From a selection of
stratigraphic interval,

## DOMAIN: well, stratigraphy, pressure, depth, fluid

61.1 SPARQL Query ./061/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  ?stratigraphic_unit (AVG(?pressure) as ?avg_pressure)
WHERE
  { ?w     a                     :Wellbore ;
           :hasWellboreInterval  ?wi ;
           :hasFormationPressure  ?fp .
    ?fp    :valueInStandardUnit  ?formation_pressure ;
    	   :hasDepth  ?fpd.
    ?fpd   :inWellboreInterval   ?wi.
    ?wi    a                     :StratigraphicZone ;
           :hasUnit              ?stratigraphic_unit .
} GROUP BY (?stratigraphic_unit)

62 Information Need 062

I recently got a task to show what wells have cores in a specific set of
stratigraphic units. I wanted to do a more generic approach for reuse,
and aimed at identifying all wells with cores and what units these cores
intersect. Then any user could later filter for the unit(s) of interest. I do
several steps to encounter this. Also I include some additional information
such as link to wellbore images and link to the EPDS document finder.
Next step could be to include more info from internal database(s) and
data from the UK side in addition to additional calculations.

## DOMAIN: well, core, stratigraphy

62.1 SPARQL Query ./062/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name
WHERE
  { ?w  a                     :Wellbore ;
        :name                 ?wellbore_name ;
        :hasWellboreInterval  ?interval .
    ?c  a                     :Core ;
        :extractedFrom        ?interval
  }

62.2 SPARQL Query ./062/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  *
WHERE
  { ?w   a                     :Wellbore ;
         :name                 ?wellbore_name ;
         :hasWellboreInterval  ?wi .
    ?c   a                     :Core ;
         :extractedFrom        ?wi .
    ?wi  :overlapsWellboreInterval  ?z .
    ?z   :hasUnit              ?u .
    ?u   :name                 ?uName
    FILTER regex(?uName, "NORDLAND")
    ?c  :hasCoreSample        ?s .
    ?s  :hasPermeability  ?p .
    ?p  :valueInStandardUnit  ?permeability
  }

62.3 SPARQL Query ./062/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT DISTINCT  ?wellbore_name ?uName
WHERE
  { ?w        a                     :Wellbore ;
              :name                 ?wellbore_name ;
              :hasWellboreInterval  ?interval .
    ?c        :extractedFrom        ?interval ;
              a                     :Core .
    ?interval  :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?u .
    ?u        :name                 ?uName
    FILTER regex(?uName, "Tarbert", "i")
  }

63 Information Need 063

# Show wellbores (return wellbore name, lat and long) restricted to a polygon (58 < lat < 62 and - 1 < long < 5)

that penetrate a specific stratigraphic unit, e.g., # Draupne Formation (‘Draupne Fm’)

and with Draupne Fm core coverage (with core identifier, MD and TVD values from core top in meters)

and with log curves coverage (all of the following: LFP_GR (gamma ray), LFP_PHIT (porosity), LFP_RHOB (density), LFP_DT (velocity).

and return geochemical measurements from the intersection of the above intervals (with attribute names and values)

List the following attributes:

-Wellbore name, lat, long,

-strat unit name, strat unit top mMD_RKB, strat unit base mMD_RKB, strat unit top mTVD_SS

-Core name, Core Top mMD_RKB, Core Base mMD_RKB

-LFP_GR_Top_mMD, LFP_GR_Base_mMD, LFP_PHIT_Top_mMD, LFP_PHIT_Base_mMD, LFP_RHOB_Top_mMD, LFP_RHOB_Base_mMD, LFP_DT_Top_mMD, LFP_DT_Base_mMD,

-Geochemistry attribute names present 
## DOMAIN: well, stratigraphy, geochemmistry, cores, 
## COMMENT:

63.1 SPARQL Query ./063/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     :name                 ?wellbore ;
           :hasWellboreInterval  ?zone .
    ?zone  :hasUnit              ?unit
    FILTER regex(?unit, "Draupne", "i")
    ?zone     :overlapsWellboreInterval  ?cored_int .
    ?draupne_core
              :extractedFrom        ?cored_int .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_GR .
    ?logged_LFP_GR
              :hasLogCurve          ?LFP_GR_log .
    ?LFP_GR_log  :logCurveNameShort  ?LFP_GR_logname
    FILTER regex(?LFP_GR_logname, "LFP_GR")
    ?zone     :overlapsWellboreInterval  ?logged_LFP_PHIT .
    ?LFP_PHIT_log
              :logCurveNameShort    ?LFP_PHIT_logname
    FILTER regex(?LFP_PHIT_logname, "LFP_PHIT")
    ?logged_LFP_PHIT
              :hasLogCurve          ?LFP_PHIT_log .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_DT .
    ?logged_LFP_DT
              :hasLogCurve          ?LFP_DT_log .
    ?LFP_DT_log  :logCurveNameShort  ?LFP_DT_logname
    FILTER regex(?LFP_DT_logname, "LFP_DT")
    ?well  :hasWellbore  ?w ;
           :locatedIn    ?pos .
    ?pos   :latitude     ?lat ;
           :longitude    ?long
    FILTER ( ( ( ( ?lat > 58 ) && ( ?lat < 62 ) ) && ( ?long > -1 ) ) && ( ?long < 5 ) )
  }

63.2 SPARQL Query ./063/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     :name                 ?wellbore ;
           :hasWellboreInterval  ?zone .
    ?zone  :hasUnit              ?unit
    FILTER regex(?unit, "Draupne", "i")
    ?zone     :overlapsWellboreInterval  ?cored_int .
    ?draupne_core
              :extractedFrom        ?cored_int .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_GR .
    ?logged_LFP_GR
              :hasLogCurve          ?LFP_GR_log .
    ?LFP_GR_log  :logCurveNameShort  ?LFP_GR_logname
    FILTER regex(?LFP_GR_logname, "LFP_GR")
    ?zone     :overlapsWellboreInterval  ?logged_LFP_PHIT .
    ?LFP_PHIT_log
              :logCurveNameShort    ?LFP_PHIT_logname
    FILTER regex(?LFP_PHIT_logname, "LFP_PHIT")
    ?logged_LFP_PHIT
              :hasLogCurve          ?LFP_PHIT_log .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_DT .
    ?logged_LFP_DT
              :hasLogCurve          ?LFP_DT_log .
    ?LFP_DT_log  :logCurveNameShort  ?LFP_DT_logname
    FILTER regex(?LFP_DT_logname, "LFP_DT")
    ?cored_int  :hasTopDepth  ?top_md ;
              :hasTopDepth  ?top_tvd ;
              :hasBottomDepth  ?bot_md ;
              :hasBottomDepth  ?bot_tvd .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_md_m .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?bot_md_m .
    ?top_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_tvd_m .
    ?bot_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?bot_tvd_m
  }

63.3 SPARQL Query ./063/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     :name                 ?wellbore ;
           :hasWellboreInterval  ?zone .
    ?zone  :hasUnit              ?unit
    FILTER regex(?unit, "Draupne", "i")
    ?zone     :overlapsWellboreInterval  ?cored_int .
    ?draupne_core
              :extractedFrom        ?cored_int .
    ?w        :hasGeochemicalMeasurement  ?geochem .
    ?geochem  :hasDepth  ?geochem_depth .
    ?geochem_depth
              :inWellboreInterval   ?zone .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_GR .
    ?logged_LFP_GR
              :hasLogCurve          ?LFP_GR_log .
    ?LFP_GR_log  :logCurveNameShort  ?LFP_GR_logname
    FILTER regex(?LFP_GR_logname, "LFP_GR")
    ?zone     :overlapsWellboreInterval  ?logged_LFP_PHIT .
    ?LFP_PHIT_log
              :logCurveNameShort    ?LFP_PHIT_logname
    FILTER regex(?LFP_PHIT_logname, "LFP_PHIT")
    ?logged_LFP_PHIT
              :hasLogCurve          ?LFP_PHIT_log .
    ?zone     :overlapsWellboreInterval  ?logged_LFP_DT .
    ?logged_LFP_DT
              :hasLogCurve          ?LFP_DT_log .
    ?LFP_DT_log  :logCurveNameShort  ?LFP_DT_logname
    FILTER regex(?LFP_DT_logname, "LFP_DT")
    ?cored_int  :hasTopDepth  ?top_md ;
              :hasTopDepth  ?top_tvd ;
              :hasBottomDepth  ?bot_md ;
              :hasBottomDepth  ?bot_tvd .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_md_m .
    ?bot_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?bot_md_m .
    ?top_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?top_tvd_m .
    ?bot_tvd  a                     :TrueVerticalDepth ;
              :valueInStandardUnit  ?bot_tvd_m
  }

64 Information Need 064

All wells with log data covering the Shetland Gp.

## DOMAIN: well, log, stratigraphy
## COMMENT: Shetland Gp. would be a zone, an interval between two well markers

65 Information Need 065

All wells with density and sonic log covering the Shetland Gp.

## DOMAIN: well, log, stratigraphy
## COMMENT: Shetland Gp. would be a zone, an interval between two well markers

66 Information Need 066

All wells with LFP log sets covering the Shetland Gp.

## DOMAIN: well, log, stratigraphy
## COMMENT: LFP log sets are a specific set of petrophysically interpreted data.

67 Information Need 067

All wells with log data covering the Shetland Gp. that are not in my Petrel project.

## DOMAIN: well, log, stratigraphy

67.1 SPARQL Query ./067/01.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w     a                     :Wellbore ;
           :hasWellboreInterval  ?int .
    ?int   :hasLogCurve          ?l .
    ?well  :hasWellbore          ?w ;
           :locatedIn            ?pos .
    ?pos   :latitude             ?lat ;
           :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

67.2 SPARQL Query ./067/02.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      :hasLogCurve          ?l ;
              :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?strat_unit .
    ?strat_unit  :name              ?strat_unit_name .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

67.3 SPARQL Query ./067/03.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      :hasLogCurve          ?l ;
              :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?strat_unit .
    ?strat_unit  :name              ?strat_unit_name
    FILTER regex(?strat_unit_name, "BRENT")
  }

67.4 SPARQL Query ./067/04.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>

SELECT  *
WHERE
  { ?w        a                     :Wellbore ;
              :hasWellboreInterval  ?int .
    ?int      :hasLogCurve          ?l .
    ?l        :numberOfSamples      ?num_samples .
    ?int      :overlapsWellboreInterval  ?zone .
    ?zone     :hasUnit              ?strat_unit .
    ?strat_unit  :name              ?strat_unit_name .
    ?zone     :hasTopDepth  ?top_md .
    ?top_md   a                     :MeasuredDepth ;
              :valueInStandardUnit  ?top_md_m .
    ?well     :hasWellbore          ?w ;
              :locatedIn            ?pos .
    ?pos      :latitude             ?lat ;
              :longitude            ?long
    FILTER ( ( ( ( ?lat > 60 ) && ( ?lat < 62 ) ) && ( ?long > 2 ) ) && ( ?long < 3 ) )
  }

67.5 SPARQL Query ./067/05.q

PREFIX  :     <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>
PREFIX  ns2:  <http://slegger.gitlab.io/slegge-obda/ontology/subsurface-exploration#>
PREFIX  ns1:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT  ?c1 ?c2 ?c3 ?c4
WHERE
  { ?c1  ns1:type              :WellboreInterval .
    ?c2  ns1:type              :LogCurve .
    ?c3  ns1:type              :WellboreInterval .
    ?c4  ns1:type              :StratigraphicUnit .
    ?c1  :hasLogCurve          ?c2 ;
         :overlapsWellboreInterval  ?c3 .
    ?c3  :hasUnit              ?c4 .
    ?c4  :name                 ?a1
    FILTER regex(?a1, "Shetland", "i")
  }

68 Information Need 068

Average effective porosity values of Etive Fm.

##DOMAIN: Porosity, stratigraphy
##COMMENT: All wells with effective porosity logs in the Etive Fm. (between two well markers)
        Average porosity if any data source already has it OR, we calculate this in Petrel using porosity logs in loaded into Petrel and the well top markers.

69 Information Need 069

Wells with logs covering > than 1000m vertically

## DOMAIN: log

70 Information Need 070

All wells with time-depth relationships

##DOMAIN: seismic, wellbore
##COMMENT: "Time" means the time for a seismic wave to return.

71 Information Need 071

All wells with TIME_CKS time-depth relationships

##DOMAIN: seismic, wellbore
##COMMENT: "Time" means the time for a seismic wave to return. We do not yet know what TIME_CKS is

72 Information Need 072

Wells with sonic, density logs and time-depth relationships

##DOMAIN: wellbore, log, seismic

73 Information Need 073

Wells with sonic compressional, sonic shear, density, time-depth relationships and LFP log sets

##DOMAIN: wellbore, log, seismic

Created: 2017-05-15 Mon 21:42

Validate