How deep can I go in a select statement
Hi all
I'm a newbie transistioning from FM and trying to wrap my head around how Ninox does things. First I have the following tables:
Riders
Results
Teams
Team Membership
I'm working in Team Membership to show me a breakdown of how each team did and how each rider in each team did. So the Team Membership table is linked to Riders, Results and Teams. I working on a formula to get all of the rider's results of a particular year.
I can do this simple formula:
sum(Riders.Results.Penalty4Average_Jumped)
But it gives me all results for each rider.
So I try this:
sum((select Results where Riders.Results.Year = "2019" and Riders.Results.Riders.RiderID = Riders.RiderID).Penalty4Average_Jumped)
And I get 0.
Where is my problem?
Thanks,
1 reply
-
Well I figured it out:
let r := this;
sum((select Results where Year = "2019" and Riders.RiderID = r.Riders.RiderID).Penalty4Average_Jumped)
Content aside
- 4 yrs agoLast active
- 1Replies
- 1036Views