select sum(fee) as Fee from ACCOUNT2.feecdr2 where (uid = any(select buid from ACCOUNT2.person where cid=1001) or uid=any(select muid from ACCOUNT2.person where cid=1001) or  uid=123456789) and begintime>date_sub(now(),interval 56 DAY) and begintime<date_sub(now(),interval 25 DAY) and type=24
这个查询语句要查询半个小时都没查出来,锁表了。 各位老大帮忙看下,先谢了!