Not sure if this question has been answered yet but I’ll give it a shot. I was curious if there is any reason why this particular line in SQL outputs 0
SELECT (517 + 309 + 304 + 282) / 6366;
But, when I run this:
SELECT (517 + 309 + 304 + 282) / 6366.0;
I get an answer of 0.221803330191643, which is the right answer.
Is there any reason for this and if so, is this just a regular SQL command (to add a decimal after the whole number)?
Any help would be appreciated!