急,sql语句问题。
id               vid                              coun   
    1               v10037026	         0 
    2               v10037026	         2 
    3               v10040380	         0 
    4               v10040380	         1 
    5               v9892061	         0 
    6               v9892061	         2 
    7               v9892061	         4 
    8               v9892061	         6   
 怎么写一个sql语句得到下列行 
    2               v10037026	         2 
    4               v10040380	         1 
    6               v9892061	         2 
 就是得到每个相同vid的coun列不等于0并且为最小值
------解决方案--------------------select * 
 from 表,(select vid,min(coun) coun from 表 where coun <> 0 group by vid)t 
 where 表.vid=t.vid and 表.coun=t.coun
------解决方案--------------------select id,vid,coun 
 from 表 
 where id in(2,4,6)
------解决方案--------------------select * from 表 s where exists (select 1 from 表 where s.vid=vid and coun <> 0 and a.id> id)   
 ?
------解决方案--------------------not exists 加多个
------解决方案--------------------select e.* 
 from e,(select vid,min(coun) coun from e where coun> 0 group by vid)t 
 where e.vid=t.vid and e.coun=t.coun 
 返回: 
 id   vid                  coun  
 ---- -------------------- ----  
 2    v10037026            2 
 4    v10040380            1 
 6    v9892061             2   
 (所影响的行数为 3 行)
------解决方案--------------------e为表的名称
------解决方案--------------------select id,vid,min(coun) from (select * from  #v where coun <> 0) a   group by id,vid