Get linked fields using formula

I’m trying to repace notion, but hadn’t found an alternative, airtables can’t do this either:

have 3 tables, A → B → C , and want to get data from A in C but cant find a way

For example I have a clients table, a contracts table and a monthly payments table, in payments table i link to the contract to be paid (and ofc contracts links to clients), clients table include a field security_deposit. I want to calculate the amount to pay for the given month, and include a checkbox to mark its the first payment.

Notion can’t do it in gui, but what it can do is to reference a column of a linked table in a formula.

This would be something like: if( first, contract.map(current.client.map(current.security_deposit)).sum(), 0 )

I tried unsuccessfully to replicate it in airtables, and the only way was to carry the data from A to B and then from B to C using lookups (they confirmed it in the forum) it seems it is the same case here in nocodb, or there is a way??

Nested Lookup’s (like in airtable) is the way with NocoDB as well.