removed unneeded group by from query and threads - 1