select
count(case when loan_amount>500000 then id end),
count(case when name like '金%' then id end)
from lw_biz.loan
----------------------------------------------
select * from ( values (1,'自动构建结果集','2008-7-10'), (2,'自动构建结果集','2008-7-10') ) somename
...