Views as sub table

It would be helpful if a View could be utilized as a sub table.

My use case:

Tables: Campaigns and Companies.

Companies havea campaign_id from the campaigns table.

Campaigns can therefore have a list of companies.

Because Companies are not always Campaign Companies, renaming the table does not make sense.

But if I could create a View with a name of campaign_companies, that simply includes everything from the companies table, then I could utilize it as a sub table.

Why don’t you use a multi reference? This is actually a junction table between two main entities to create many to many relation.

A multi reference is seen as a sub table and you can add also any joins to it to create nested queries.

1 Like

Yep, I can do that too.