标签: postgresql
我想要平均值,但显示为空。我想要不同ID中的平均得分
select avg(score*100)from daily_stats1 where id=10 and id=11
答案 0 :(得分:0)
只需使用null函数摆脱coalesce的值:
null
coalesce
select avg(coalesce(score, 0)*100)from daily_stats1 where id=10 and id=11