8a-gas-allWellbore-allField-injectionAllocated-D.dong 2.17 KB
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX erhi: <http://www.reportinghub.no/erhi/schema/1.0/interface-model#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>

SELECT  ?licence  ?fieldName ?wellboreName ?flow ?startProductDate ?endProductDate ?density ?densityUnit ?mass  ?massUnit  ?volume ?volumeUnit  ?bhp_value ?bhp_unit ?bht_value ?bht_unit ?whp_value ?whp_unit ?wht_value ?wht_unit ?wellboreStatus
WHERE {
	?licence rdf:type erhi:LicenceOrBaa .
	?licenceShare erhi:licenceOrBaaShared ?licence.
	?licenceShare erhi:licenceOrBaaShareHolder ?licenceOwner.

	?licenceOwner erhi:npdid "4070011".
	?licenceShare erhi:percentageOfShare  ?percentageOfShare.
	?licence erhi:ownsField ?field .

	?field
		erhi:npdname ?fieldName;
		erhi:hasWellbore ?wellbore.

	?wellbore erhi:npdname ?wellboreName.

	?flow erhi:flowIntoOrOutOf ?wellbore.
	?flow a erhi:InjectionFlow, erhi:AllocatedFlow .

	?flow erhi:hasProduct ?flowProduct.
	?flowProduct erhi:productStartAt ?startProductDate.
	?flowProduct erhi:productEndAt ?endProductDate.
	?flowProduct erhi:hasTimePeriod "Daily".

	?flowProduct 
		erhi:hasProductKind "gas".
	OPTIONAL {
		?flowProduct	erhi:hasDensity	?density;
			erhi:hasDensityUnit ?densityUnit.
	}

	OPTIONAL {
		?flowProduct	erhi:hasMass	?mass;
			erhi:hasMassUnit		?massUnit.
	}

	OPTIONAL {
		?flowProduct	erhi:hasVolume	?volume;
			erhi:hasVolumeUnit	?volumeUnit.
	}

	OPTIONAL {
		?flow erhi:wellboreBottomholePressureValue ?bhp_value.
		?flow erhi:wellboreBottomholePressureUnit ?bhp_unit.
	}

	OPTIONAL {
		?flow erhi:wellboreBottomholeTemperatureValue ?bht_value.
		?flow erhi:wellboreBottomholeTemperatureUnit ?bht_unit.
	}

	OPTIONAL {
		?flow erhi:wellboreWellheadPressureValue ?whp_value.
		?flow erhi:wellboreWellheadPressureUnit ?whp_unit.
	}

	OPTIONAL {
		?flow erhi:wellboreWellheadTemperatureValue ?wht_value.
		?flow erhi:wellboreWellheadTemperatureUnit ?wht_unit.
	}

	OPTIONAL {
		?flow erhi:wellboreChockeSizeValue ?chokeSize_value.
		?flow erhi:wellboreChockeSizeUnit ?chokeSize_unit.
	}

	OPTIONAL {
		?flow erhi:wellboreStatus ?wellboreStatus.
	}


	FILTER (?startProductDate > "2012-02-25"^^xsd:date)
	FILTER (?endProductDate < "2012-03-10"^^xsd:date)
}
limit 5