select b.promo_number,b.payment_time,b.validity_days,a.tim,b.goods_name,b.payment_time+b.validity_days from (selectmax(m.send_time) tim from tb_payment_promo_log p,tb_mobile_log m where p.goods_id=615732and p.user_name='ywj123' and p.promo_number=m.operate and p.user_name= m.user_name ) a , tb_payment_promo_log b,tb_mobile_log c where b.goods_id=615732and b.user_name='ywj123'and b.user_name= c.user_nameand a.tim = c.send_time orderby b.payment_time desc
select t3.usid,t3.usname,t3.usarea,t3.cell from (select t2.cellphone cell,max(t1.game_money+t1.bank_game_money) money,t1.user_id usid,t1.user_name usname,t1.user_area usarea from tb_rd_user_info t1,tb_rd_user_info2 t2 where t1.login_tim <= sysdate-7and t1.login_tim > sysdate-8and t1.user_id= t2.user_idand t2.cellphone isnotnull groupby t2.cellphone,t1.user_id,t1.user_name,t1.user_area) t3 where t3.money<500000
select b.promo_number,b.payment_time,b.validity_days,a.tim,b.goods_name,b.payment_time+b.validity_days from (select max(m.send_time) tim from tb_payment_promo_log p,tb_mobile_log m...