Select count(CustomerID),CustomerID From Orders Where ……
Group by CustomerID having count(customerid) > 2
以上语句针对SQL Server 7 示例数据库 Northwind 产生
其中 Where 子句请自己产生(提示:Where orderdate>dateadd(m,-1,getdate())
And orderdate<=getdate() )
注:别忘了给分喔
Group by CustomerID having count(customerid) > 2
以上语句针对SQL Server 7 示例数据库 Northwind 产生
其中 Where 子句请自己产生(提示:Where orderdate>dateadd(m,-1,getdate())
And orderdate<=getdate() )
注:别忘了给分喔
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货