怎样实现这个查询条件? select nianyue,count(*) as 连续月数from table where 数量=0group by nianyue having count(*)>6 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select yuef,count(*) as 6from jf_jifbzdlwhere chaojygdl = 0group by yuef having count(*) > 6我用的是sybase数据库,执行时说第一行语法错误 select distinct [id] from Utable as Twhere exists(select [id] from Utable where [id]=T.[id] and nianyue<=T.nianyue and count(*)>=6) select distinct [id] from Utable as Twhere exists(select [id] from Utable where [id]=T.[id] and shuliang=0 and nianyue<=T.nianyue-5 and count(*)>=6) 求高手解答 SqlExpress可否代替Access数据库使用 sql 同一条记录 各个字段比较 取最大值 疑难统计问题 怎么实现下面的查询? sql server2000设置数据源为什么不能通过测试?急! 求查询按排序结果得到的上一条或下一条记录SQL 救我呀!!!怎样把自己建好的ms sql sever 数据库拷到别的装有mssql server机器上去 存储过程中,生成SQL语句问题... Sql 日志问题 想在周日的时候,更新特定表的某个字段,这样的触发器怎么写? 初学者的学习-4-->用户,数据库的关系
from jf_jifbzdl
where chaojygdl = 0
group by yuef having count(*) > 6我用的是sybase数据库,执行时说第一行语法错误
where exists
(select [id] from Utable where [id]=T.[id] and nianyue<=T.nianyue and count(*)>=6)
where exists
(select [id] from Utable where [id]=T.[id] and shuliang=0 and nianyue<=T.nianyue-5 and count(*)>=6)