SQL matrix multiply revisited 2