27,579
社区成员
发帖
与我相关
我的任务
分享
select * from (select row_number() over(order by userKeywordsID) as Rownum
,userID,title
from 表A where status=1 and statusPlan=1
and (budgetMoneyLimit=0 or budgetMoneyLimit<= (select clickAllMoney from VM_表B
where VM_表B.userID =表A.userID and clickAllMoney is not null)) group by userKeywordsID,userID,title)a
where (Rownum between 1 and 10)
budgetMoneyLimit<= (select clickAllMoney from VM_表B where VM_表B.userID =表A.userID)
select * from (select row_number() over(order by userKeywordsID) as Rownum,userID,title
from 表A where status=1 and statusPlan=1
and (budgetMoneyLimit=0 or
exists(select 1 from VM_表B where VM_表B.userID =表A.userID and 表A.budgetMoneyLimit<=clickAllMoney))
group by userKeywordsID,userID,title)a where (Rownum between 1 and 10)