SELECT Consumer, Provider, Service, Min(Begin) AS MinOfBegin, Max(End) AS MaxOfEnd FROM MyTable GROUP BY Consumer, Provider, Service;