The virus particles would be filtered out at the top layer of the sand filter, where a layer of microbes grow. This layer is referred to as the schmutzdecke. https://en.wikipedia.org/wiki/Schmutzdecke
Most of the filtering action happens in that layer. Viruses have no problem getting past sand particles.