您好,欢迎访问一九零五行业门户网

急SQL语句

急求一个sql语句
id only date in out c2  
3005 131 20120604 2 0 0 
3004 184 20120604 1 0 0 
3003 131 20120605 2 6 4 
3002 180 20120605 1 0 0 
3001 257 20120606 2 0 3 
3000 131 20120606 2 0 2
表是这样的 date是每一天的日期 想做一个sql语句 就是 查询出来 3天内 这三天c2一共加起来小于5的 的所有only的集合
------解决方案--------------------
这样写会报错:unknown column 's' in 'where clause'
sql codeselect `only`,sum(`c2`) as s from test_csdb2 where s
其它类似信息

推荐信息