Suppose that we have three tables(Three Lists in SharePoint).The relations between tables are described by the following image.
I want to translate the following query to CAML query:
select c.* from TableB b inner join TableA a on b.TableAId=a.Id inner join TableC c on c.TableAId=a.Id where b.Nam='ABC' order by c.InsertDate
I know that in CAML I can join first Table B and Table A and then
with the resulted Table A.Id ,then query Table C.
But this is two step fetch data and also I lose
order by c.InsertDate in first query.
And also if I want to limit only 10 result from TableC, In first CAML query(join query) I must fetch all data in first query.
Is there better approach to implement this query in SharePoint?