常用核心数据库查询sql

一、查询账户信息

-- 查询数据量
/*{"xdb_comment":"1","table":"mb_tran_hist","pk_value":"0"}*/
select base_acct_no,count(1) num from mb_tran_hist group by base_acct_no ORDER BY num desc;

/*{"xdb_comment":"1","table":"mb_tran_hist","pk_value":"1"}*/
select base_acct_no,count(1) num from mb_tran_hist group by base_acct_no ORDER BY num desc;

/*{"xdb_comment":"1","table":"mb_tran_hist","pk_value":"2"}*/
select base_acct_no,count(1) num from mb_tran_hist group by base_acct_no ORDER BY num desc;

/*{"xdb_comment":"1","table":"mb_tran_hist","pk_value":"3"}*/
select base_acct_no,count(1) num from mb_tran_hist group by base_acct_no ORDER_BY num desc;