Hi,
I have a "Orders" datatable that has marketID, OrderID and OrderSize in it.
I want to get SUM(ordersize) for each market or for a given market
Something like
SUM(order_size) group by market_id
or
SUM(order_size) where market_id = 19
I am not sure if the second statement is a valid one but I need something of this effect. Even groupby would work.
Now, How can I do this in
DataSet.DataTables[0].Select() ???
What kind of expression should I write in select method ??
I tried this
.Select(
"SUM(order_size) group by o.market_id ")
but got an exception
"An unhandled exception of type 'System.Data.SyntaxErrorException' occurred in system.data.dll
Additional information: Syntax error: Missing operand after 'group' operator."
What operand am I missisng here ??
Thanks,