Top categories sql is changed