当前位置:Gxlcms > 数据库问题 > SQL: 某个时间段范围内,产品有价格,且求平均数

SQL: 某个时间段范围内,产品有价格,且求平均数

时间:2021-07-01 10:21:17 帮助过:12人阅读

) as avgPrice from Price where Hp_Date >=2017-07-04 and Hp_Date <=2017-07-06 group by ID having SUM(case when ISNULL(fPrice,0) > 0 and Status=0 then 1 else 0 end)=天数

 

SQL: 某个时间段范围内,产品有价格,且求平均数

标签:color   ase   group   pre   时间段   log   cas   nbsp   blog   

人气教程排行