mysql中将null值转换为0的语句
程序员文章站
2023-12-17 19:33:40
复制代码 代码如下:select if(avg(cai.conversionsrate) is null,0,avg(cai.conversionsrate)) as co...
复制代码 代码如下:
select
if(avg(cai.conversionsrate) is null,0,avg(cai.conversionsrate))
as conversionsrate
from campaign_info cai
where inserttime between '2011-02-01' and '2011-02-04' and googlecampaignid=23331401