8a-gas-givenWellbore-injectionAllocated-D.dong 1.84 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  ?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 {
	?wellbore a erhi:Wellbore ;
		erhi:npdname ?wellboreName ;
		erhi:npdid "6469".


	?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)

}