var query =datasources.db.example_data.person.createSelect();query.where.add(query.joins.person_to_parent.joins.person_to_parent.columns.name.eq('john'))foundset.loadRecords(query)
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.avg(query.columns.amount)).add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode)var ds =databaseManager.getDataSetByQuery(query,100);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.count().add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode) var ds =databaseManager.getDataSetByQuery(query,100);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.count(query.columns.amount)).add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode)var ds =databaseManager.getDataSetByQuery(query,100);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.max(query.columns.amount)).add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode)var ds =databaseManager.getDataSetByQuery(query,100);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.min(query.columns.amount)).add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode)var ds =databaseManager.getDataSetByQuery(query,100);
var query =datasources.db.example_data.orders.createSelect();query.result.add(query.aggregates.sum(query.columns.amount)).add(query.columns.countryCode)query.groupBy.add(query.columns.countryCode)var ds =databaseManager.getDataSetByQuery(query,100);