fix sql for query channel inccount detail