NutzCN Logo
问答 求助,Nutz sql 怎么拼装having 语句
发布于 2902天前 作者 qq_a9f5b23b 1730 次浏览 复制 上一个帖子 下一个帖子
标签:

“select member.id,member.username,member.truename,member.idcode,member.ctime as regtime, min(loan_tender.ctime) as firsttime,secondtime(loan_tender.mid) as secondtime,account_bankcard.ctime as bdtime,member.mobile,member.email
from
member left join loan_tender
on member.id=loan_tender.mid
left join account_bankcard
on
member.id=account_bankcard.mid
where member.idcode is not null
group by
member.id
having count(loan_tender.id) >= 2
order by
member.ctime desc”

最后的having count(loan_tender.id) >= 2

cnd.having(Condition);
Condition是什么?怎么填?

1 回复

只有这一个条件吗?

cnd.having(Cnd.wrap("count(loan_tender.id) >= 2"));

添加回复
请先登陆
回到顶部