Want to apply maxmin normalization but max - min is not working in GSQL

BEGIN
CREATE QUERY degree_cent_res() FOR GRAPH NetworkAnomalyDetection SYNTAX v2 {
   SELECT    s.SourceAddress, (max(s.degree) - min(s.degree)) as risk_score INTO T
   FROM      SourceIP:s -(HAS_SESSION_EVENT>:e)- SessionEvent:se
   GROUP BY  s.SourceAddress
   ORDER BY  risk_score DESC
   LIMIT  100;
   PRINT T;
}
END

Index -1 out of bounds for length 2
Failed to create queries: [degree_cent_res].

@Szilard_Barany @Dan_Barkus @Parker_Erickson @Jon_Herke

@Renchu_Song @Mohamed_Zrouga @Bruno @Pawan_Mall @Vladimir_Slesarev