shrunk sql query count