Numeric value out of range for <temporary space column>

What is the Virtuoso version being used ?

Are you saying the error also occurs with LIMIT 1000000, works with LIMIT 2000000 and fails LIMIT 3000000 or above ?

If the GROUP BY (?s0) (?s0Name) is removed does the error still occur ?