I know how to join 2 basic tables. What I'm interested in knowing is how do I join the derived tables in Codeigniter like we do in mysql by giving aliases to the tables.
Example:
Table1->where(something)->group_by(something) as derived_table1
Table2->where(something AND something)->group_by(something) as derived_table2
How do I left join these 2 derieved tables?
Please note: I know I can left join first and then apply the where clauses. But that changes the query result. I need to left join the derived tables.
i'm not sure that this is the canonical approach, but this is example how i do it: