Just trying out F# 3.0 and hit a bit of a wall when it comes to grouping by multiple columns. The obvious thing to try was
query {
for d in context.table
First you have to remember that a query is translated into actual SQL at some point. It appears that linq does not support the use of multiple group keys as a Tuple<>. Therefore any transformation into Tuple<> has to be done after the database call has completed.
Second, you should be able to achieve multiple key grouping by performing multiple groupings behind each other on the respective keys:
query {
for d1 in context.table do
groupBy d1.col1 into g1
for d2 in g1 do
groupBy d2.col2 into g2
select g2
}
Please have mercy with me if the syntax is not 100% since F# is not my native tongue :) The concept however should work just fine.