竹林疯雨吧 关注:154贴子:22,784
  • 14回复贴,共1
RT


IP属地:浙江1楼2016-09-26 12:19回复
    select user.id, user.realname 注册姓名, user.mobile 注册手机, act_address.name 收货姓名, act_address.mobile 收货手机, act_address.address 收货地址 from active.act_address join uranus.user on act_address.userId = user.id;


    IP属地:浙江2楼2016-09-26 12:23
    回复
      select `user`.id, `user`.mobile 手机, `user`.realName 姓名, luckDrawName 奖品, act_luckdrawprize.createDate 获奖时间 from `user` join `act_luckdrawprize` on act_luckdrawprize.userId = `user`.id and act_luckdrawprize.type = 'TWO';


      IP属地:浙江3楼2016-09-26 12:41
      回复
        select `user`.id, `user`.mobile 手机, `user`.realName 姓名, luckDrawName 奖品, act_luckdrawprize.createDate 获奖时间, addr.mobile 收货手机, addr.name 收货姓名, addr.address 收货地址 from `user` join `act_luckdrawprize` on act_luckdrawprize.userId = `user`.id and act_luckdrawprize.type = 'TWO' left join activity.act_address addr on addr.type = 'TWO' and addr.userId = user.id;


        IP属地:浙江4楼2016-09-26 12:59
        回复
          ALTER TABLE marketingtool ADD ruleType varchar(50) DEFAULT NULL COMMIT '规则类型';
          UPDATE marketingtool t set t.ruleType="SIGN" WHERE t.tooltype="RULE_SIGN";
          UPDATE marketingtool t set t.ruleType="TRANSACYION" WHERE t.tooltype="RULE_TRANSACYION"


          IP属地:浙江5楼2016-09-26 14:16
          回复
            SELECT grade, IFNULL(COUNT(1), 0) FROM (SELECT CASE WHEN old >= 0 AND old < 20 THEN '0' WHEN old >= 20 AND old < 30 THEN '1' WHEN old >= 30 AND old < 45 THEN '2' WHEN old >= 45 THEN '3' END AS grade FROM (SELECT year(curdate()) - if(length(idCard) = 18, substring(idCard, 7, 4), if(length(idcard) = 15, concat('19', substring(idCard, 7, 2)), NULL)) AS old FROM `user` WHERE idCard IS NOT NULL AND idCard != '') a) b GROUP BY grade order by grade;


            IP属地:浙江6楼2016-09-27 10:56
            回复
              | 10000.00 | 6 |
              | 1000.00 | 90 |
              | 2000.00 | 90 |
              | 2000.00 | 90 |
              | 6000.00 | 90 |
              | 30000.00 | 182 |
              | 10000.00 | 90 |
              | 5000.00 | 62 |
              | 5000.00 | 92 |
              | 5000.00 | 365 |
              | 8000.00 | 92 |


              IP属地:浙江7楼2016-09-27 14:58
              回复
                select sum(`order`.amount)*financing.term*1.0/365*0.008 from `order` join `product` on `order`.product_id = product.id and product.exclusive = 'JH_DY' and `order`.status = 'STATUS_PAID' join financing on financing.order_id = `order`.id and transProductId is null join invitation on invitee_id = `order`.user_id;


                IP属地:浙江8楼2016-09-28 09:50
                回复
                  select inviter_id as '邀请人', invitee_id as '受邀者', amount as '购买金额', financing.term as '期限' from invitation join financing on financing.createDate >= '2016-09-16 00:00:00' and financing.createDate <= '2016-09-30 23:59:59' and transProductId is null and invitee_id = user_id join product p on product_id = p.id and left(exclusive, 2) != 'JH';


                  IP属地:浙江9楼2016-10-08 10:37
                  回复
                    select inviter_id as '邀请人', invitee_id as '受邀者', amount as '购买金额', financing.term as '期限', financing.amount*0.008 as '所获佣金' from invitation join financing on financing.createDate >= '2016-09-16 00:00:00' and financing.createDate <= '2016-09-30 23:59:59' and transProductId is null and invitee_id = user_id join product p on product_id = p.id and left(exclusive, 2) != 'JH';


                    IP属地:浙江10楼2016-10-08 10:39
                    回复
                      select inviter_id as '邀请人', invitee_id as '受邀者', amount as '购买金额', financing.term as '期限', financing.amount*financing.term/365*0.008 as '所获佣金' from invitation join financing on financing.createDate >= '2016-09-16 00:00:00' and financing.createDate <= '2016-09-30 23:59:59' and transProductId is null and invitee_id = user_id join product p on product_id = p.id and left(exclusive, 2) != 'JH' and invitation.category is null;


                      IP属地:浙江13楼2016-10-08 11:17
                      回复
                        咦,小X你现在在做数据库这一块了?


                        IP属地:浙江17楼2016-10-19 15:24
                        收起回复
                          你竟然???


                          IP属地:浙江来自iPhone客户端18楼2016-10-28 20:18
                          回复