Last active
December 10, 2015 12:48
-
-
Save luanne/4436293 to your computer and use it in GitHub Desktop.
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
start c=node:companies(id={companyId}) | |
match | |
c<-[:parent_company*0..]-n | |
with n | |
match | |
n-[:defines_process"]->bp-[:has_cycle]->cm-[:cycle_metric]->m-[:metric_activity]->ma-[:metric_unit]->u | |
where | |
cm.measureDate>={measureStartDate} and cm.measureDate<={measureEndDate} | |
with ma,u,cm | |
match | |
ma-[:metric_unit]->(u)<-[:alert_for_unit]-(a)-[:alert_for_inspection]->i-[:has_result]->r<-[:for_inspection_result]-a | |
where | |
a.alertDate=cm.measureDate | |
and a.fromEntityType={type} | |
return distinct a.id as alertId, r.value as resultValue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment