Oxygen (gas) < Water (liquid) < Sugar (solid)
Gaseous particles have the least forces of attraction between the particles as its particles have the most kinetic energy which helps to overcome the forces of attraction. Thus gaseous particles have the most intermolecular space between their particles.
Liquid particles have comparatively more forces of attraction and less kinetic energy than the gaseous particles but they have less forces of attraction as compared to the solid particles.
Solid particles have the most forces of attraction between their particles as they have the least kinetic energy and thus the least intermolecular space. As they have the least kinetic energy, so their forces of attraction inhibits the movement of particles to a certain level, though the solid particles also move but with less kinetic energy.