select left(dtos(date),6) as CurMonth, FromLoc, ToLoc, count(OrderID) as Orders, Avg(Passengers), Sum(Rate) ; from myTable where .... order by 1,2,3 group by 1,2,3Works great, but in fact, the problem is i would like to have one row per trip, ie id like to have in the same line if i have FromLoc=x ToLoc=y or FromLoc=y and Toloc=x