I’ve though a IFNUll would work in this case but it doesn’t here’s the query i’m using.
SELECT IFNULL(ColumnB,0)
FROM points
WHERE points.keyid = schedule.Week3)
AS ColumnB
The problem is this returns 14 rows, and 2 of these rows do not match points.keyid = schedule.Week3 (which is expected). So 2 rows return nothing, and if it’s nothing I want to select the data as 0, because i need to average all 52 weeks.
Reading between the lines a bit, since the query you posted seems to be missing a few things, I think you want something like this: