select cableName,bairPress from currentcabledata where to_number(bairPress)>1580 and bureauname='玉桥营维'
上面是2个字段的一个收索我要通过统计这2个字段同时不重复的记录总数

解决方案 »

  1.   

    楼住的意思是group by 吗?
    select   cableName,bairPress,count(*)   from   currentcabledata   
    where   to_number(bairPress)> 1580   and   bureauname= '玉桥营维 ' 
    group by cableName,bairPress   最好给点数据和你想要的结果.
      

  2.   

    楼主是不是想要查出cableName, bairPress这两个字段组合起来不重复的数据啊???
    select cableName, bairPress, count(1)
      from currentcabledata
     where to_number(bairPress) > 1580
       and bureauname = '玉桥营维 '
     group by cableName, bairPress
    having count(1) = 1
      

  3.   

    看起来,就是需要一个group by 呀。
      

  4.   

    加一个group by就可以了
    select cableName,bairPress from currentcabledata where to_number(bairPress)>1580 and   bureauname=玉桥营维'
    group by cableName,bairPress
      

  5.   

    SELECT Count(DISTINCT cable_name||bairPress) AS cnt
    FROM currentcabledata
    WHERE To_Number(bairPress)> 1580
    AND bureauname= '玉桥营维'