Demo for TrimPath Query.
SQL query:
SELECT Customer.id, Customer.acctBalance, Invoice.total FROM Customer, Invoice WHERE Customer.id = Invoice.custId ORDER BY Customer.id
Query Result:
Source Data:
Invoice : [ { id: 1, total: 100, custId: 10 }, { id: 2, total: 200, custId: 10 }, { id: 3, total: 300, custId: 10 }, { id: 4, total: 400, custId: 20 } ], Customer : [ { id: 10, acctBalance: 1000 }, { id: 20, acctBalance: 2000 }, { id: 30, acctBalance: 3000 } ]
Source Schema:
Invoice : { id : { type : "String" }, total : { type : "Number" }, custId : { type : "String" } }, Customer : { id : { type : "String" }, acctBalance : { type : "Number" } }