Using "Order Details" table from Northwind database as a model.
I assume you want to do something as follows:
SELECT Count(Distinct OrderID), Count(Distinct ProductID)
FROM [Order Details]
Where OrderID & ProductID are both part of the PK.
If so, then please try the following example:
ResultsetFields fields = new ResultsetFields(2);
fields.DefineField(Order DetailsFieldIndex.OrderId, 0, "Count1", "", AggregateFunction.CountDistinct);
fields.DefineField(Order DetailsFieldIndex.ProductId, 1, "Count2", "", AggregateFunction.CountDistinct);
dynamicList = new DataTable();
DataAccessAdapter DAA = new DataAccessAdapter();
DAA.FetchTypedList(fields, dynamicList, null, 0, null, false, null);