fixed design statistics query

fixed an invalid query