那么 "参数2:根据Lane 取得Class3 与Class4的和。"这句话的意思就是
当Lane=1的时候,返回Class为3的 Speed的值+Class为4的Speed的值吧?
假设把数据都放在一个叫A的二维结构体里面了。
试着用代码描述一下你的问题,是不是下面这样的啊?
From lane in (from m in A Select m.Lane Distinct)
Select plan=lane,
参数1=if(lane=0, 一个算术式, 0),
参数2=if(lane=1, (From m in A where m.Lane=lane and (m.Class=3 or m.Class=4) Select m.Speed).Sum(), 0),
参数3=if(lane=2, (From m in A where m.Lane=lane Select m.Occu).Max(), 0)