-﻿-- 03 Find Connectivity Matrix of a scenario of a network
+﻿-- 03.1 Find Connectivity Matrix of a scenario of a network
 
 /*
-Use case #3: How are the water system components physically connected? Show directions of flow 
+Use case #3.1: How are the water system components physically connected? Show directions of flow 
 
 
 Users can use such query to understand how the water infrastructure is connected 


Left JOIN  "Attributes" As "AttLinkEndInstance"
ON "AttLinkEndInstance"."AttributeID"="ObjectAttEndNodeInstance"."AttributeID"
-- Over 

WHERE  "AttLinkInstance"."NativeAttributeName"='ObjectInstances'
AND "Attributes"."NativeAttributeName"='ObjectInstances'
AND DataStructureName='WEAP'
AND ScenarioName ='BaseCaseLower'


 
*/

SELECT  "Instances"."InstanceName" As "LinkInstanceName",
 "Instances".InstanceID AS "LinkInstaceID",
"ObjectTypes"."NativeObjectName",
"StartNodeInstance"."InstanceName" AS "StartInstanceName",
"StartNodeInstance"."InstanceID" AS "StartNodeInstanceID",
"ObjectTypeStartNodeInstance"."NativeObjectName",
"EndNodeInstance"."InstanceName" AS "EndInstanceName",
"EndNodeInstance"."InstanceID" AS "EndNodeInstanceID",
"ObjectTypeEndNodeInstance"."NativeObjectName" As "ObjectEndInstance"
--,"DataStructures"."DataStructureName"

