Let\'s say you have the following table (the column of interest here is cid):
cid
+-----+-------+-------+-------+---------------------+-------------
You could use a filtering join:
select * from ( select cid , min(time) as min_time from YourTable group by cid ) filter join YourTable yt on filter.cid = yt.cid and filter.min_time = yt.time