你没说明白啊!你的表里也没有点击量的字段啊!怎么统计.
正常应该是这样的.
SELECT SUM(CUN) FROM BIAO WHERE id=? AND  TIME<'2004-11-1' AND TIME>'2004-11-30' GROUP BY PAGE

解决方案 »

  1.   

    明白了.这三个字段都是主键对不?
    SELECT   COUNT(id)   FROM   BIAO   WHERE   PAGE=?   AND     TIME < ?   AND   TIME> ? 
      
      

  2.   

    不是 数据库里就没有点击率的 字段 
    我要通过  count 才能取道总数 ,而且要把 一年的数据 按照 每月的输出出来
      

  3.   

    id         ip          url        time
            14 10.0.0.50 1 2004-6-28 16:23:24
    15 10.0.0.50 1 2004-6-28 16:24:56
    16 10.0.0.50 1 2004-6-28 16:31:56
    17 10.0.0.50 1 2004-6-28 16:35:56
    18 10.0.0.50 1 2004-6-28 16:41:07
    19 10.0.0.50 1 2004-6-28 16:51:47
    20 10.0.0.50 1 2004-6-28 16:57:49
    21 10.0.0.1 1 2004-6-28 17:02:09
    22 10.0.0.16 1 2004-6-28 17:02:26
            23      10.0.0.16       1       2004-7-28 这个市数据库里面的数据  要  输出成    六月      点击率      1000
                七月      点击率       100这个样子               
                                      
      

  4.   

    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-1-1 and time<=2004-1-31
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-2-1 and time<=2004-2-28
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-3-1 and time<=2004-3-31
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-4-1 and time<=2004-4-30
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-5-1 and time<=2004-5-31
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-6-1 and time<=2004-6-30
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-7-1 and time<=2004-7-30
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-8-1 and time<=2004-8-31
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-9-1 and time<=2004-9-30
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-10-1 and time<=2004-10-31
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-11-1 and time<=2004-11-30
    union all
    SELECT COUNT(1),page FROM BIAO where page=? and time>=2004-12-1 and time<=2004-12-31
      

  5.   

    select  DECODE( to_char(time,'mm) ,'01','1月 点击率 ','02','2月 点击率 ',........) AS riqi
      ,COUNT(id)   
      from   table  
      group   by   riqi

    你试一下.