Perform Aggregate function of DataTable?

Use Select instead compute summaryTable. Select("FilterationExpression"); DataRow dr = _summaryTable. Select("min(FareAdult),AirlineDisplayName='" + Convert.

ToString(airline"AirlineDisplayName") + "' and ( Stops=0) ").

Use Select instead compute _summaryTable. Select("FilterationExpression"); DataRow dr = _summaryTable. Select("min(FareAdult),AirlineDisplayName='" + Convert.

ToString(airline"AirlineDisplayName") + "' and ( Stops=0) ").

I have to select the Minimum FareAdult – Shivi May 11 at 13:07 check this, and you will see you can add aggregate function as well. Stackoverflow. Com/questions/5892993/… – Muhammad Akhtar May 11 at 13:13.

Here is a LINQ method. This is pseudocode since I don't know the typing of your row, and I haven't been able to test it, but the idea is the same. Use LINQ to select the rows that match your criteria, order by the FareAdult and then select the first (minimum).

Var minResult = (from row in _summaryTable. Rows where row. AirlineDisplayName == airline"AirlineDisplayName" && row.

Stops == 0 orderby row. FareAdult select row).FirstOrDefault().

The expression parameter requires an aggregate function. If you must perform an operation on two or more columns, you should create a DataColumn, set its Expression property to an appropriate expression, and use an aggregate expression on the resulting column. The second parameter, filter, determines which rows are used in the expression.

For rules on creating expressions for both parameters, see the DataColumn.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions