mysql中将null值转换为0的语句
程序员文章站
2023-12-13 18:29:28
复制代码 代码如下: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