It would be nice if a query result could be used on the right side of a statement. Then it would for example be possible to retrieve all windows with a height equal to the height of a specific door. The BimQL query for this problem would look like this.
Where ?Var1.Attribute.GlobalId = “32UdM49pfAMxiX5WyXhCuy”
Select ?Var2 := ?Var1.Attribute.OverallHeight
Where ?Var3.EntityType = “IfcWindow” And ?Var3.Attribute.OverallHeigt = ?Var2
To make this possible the relationright-rule of the BimQL-grammar needs to be adjusted. Now the relationright-rule only accepts integers, real numbers and strings. It should also be able to accepts variables.