I am new to BO, sorry if the question is a bit silly;
There are 2 tables: tb_project and tb_contract, linked one-to-many (each contract having a foreign key to project). Every contract has a version (integer), so for one project there can be multiple contracts having the same value of FK (project id) and different versions
When desiging my universe, I need to take into account only the latest versions of contracts.
In SQL, I have a ‘where’ clause smth like 'where contracts1.version= select max(version) from contracts2 where contracts1.project_id=contracts1.project_id)
But so far I could not find a way to achieve the same result in BO - to make sure that in my universe only the latest versions of the contract will appear?
try this: Edit the join between the two tables and use
contracts1.version = contracts2.version AND
contracts2.version = (SELECT MAX(version) FROM contracts2 WHERE contracts2.project_id = contracts1.project_id)
or whatever you need, thus creating a complex join.