Or, you can try select count(*) from (select distinct company, time, region from test) t
Jeff Hunter
Forum Rules