-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Specific_Instance_ Implementations.sql
- Loading branch information
Adel M. Abdallah
authored
Nov 9, 2018
1 parent
e39a44a
commit e1a706d
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
-- Show how Hyrum Reservoir node instance has seven different implementations | ||
-- where ObjectTypeCV and InstanceNameCV make all of them related. | ||
|
||
SELECT DISTINCT ResourceTypeAcronym,MasterNetworkName, ScenarioName,ObjectTypeCV,ObjectType,InstanceNameCV,InstanceName | ||
|
||
FROM ResourceTypes | ||
|
||
Left JOIN "ObjectTypes" | ||
ON "ObjectTypes"."ResourceTypeID"="ResourceTypes"."ResourceTypeID" | ||
|
||
LEFT JOIN "Attributes" | ||
ON "Attributes"."ObjectTypeID"="ObjectTypes"."ObjectTypeID" | ||
|
||
LEFT JOIN "Mappings" | ||
ON "Mappings"."AttributeID"= "Attributes"."AttributeID" | ||
|
||
LEFT JOIN "Instances" | ||
ON "Instances"."InstanceID"="Mappings"."InstanceID" | ||
|
||
LEFT JOIN "ValuesMapper" | ||
ON "ValuesMapper"."ValuesMapperID"="Mappings"."ValuesMapperID" | ||
|
||
LEFT JOIN "ScenarioMappings" | ||
ON "ScenarioMappings"."MappingID"="Mappings"."MappingID" | ||
|
||
LEFT JOIN "Scenarios" | ||
ON "Scenarios"."ScenarioID"="ScenarioMappings"."ScenarioID" | ||
|
||
LEFT JOIN "MasterNetworks" | ||
ON "MasterNetworks"."MasterNetworkID"="Scenarios"."MasterNetworkID" | ||
|
||
|
||
|
||
-- Specifiy controlled Object Type, instance name, and an attribute of interest | ||
WHERE ObjectTypeCV='Reservoir' and InstanceNameCV='Hyrum Reservoir' | ||
|
||
|