sum cast is easier than nullif which is easier than case