select 年,月,日,消费人,消费地点,sum(消费金额)
from table
group by 年,月,日,消费人,消费地点

解决方案 »

  1.   

    select 消费金额 from 消费表 where 日期='2003-6-1' and 消费者='A' and 消费地点='广西'"
    我要分
      

  2.   

    select 年,月,日,消费人,消费地点,sum(消费金额) 消费总金额 from 表 group by 年,月,日,消费人,消费地点
      

  3.   

    select sum(消费金额) 消费总金额 from 表 where 年=2003 and 月=5 and 日=30 and 消费人='A' and 消费地点=456
      

  4.   

    select 年,月,日,消费人,消费地点,sum(消费金额)
    from table
    group by 年,月,日,消费人,消费地点select sum(消费金额) 
    from 表 
    where 年=2003 and 月=5 and 日=30 and 消费人='A' and 消费地点=456
      

  5.   

    select sum(消费金额) 消费总金额 from 表 
    where 年=2003 and 月=5 and 日=30 and 消费人='A' and 消费地点=456