Created
February 28, 2018 03:08
-
-
Save hellojinjie/9b2355fc31133b3c82442cc36a97fa84 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180227%' order by dateline desc; | |
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180228%' order by dateline desc; | |
create table ims_checkin_payment_20180228 as select * from ims_checkin_payment; | |
insert into ims_checkin_payment (uid, rid, uniacid, tid, amount,dateline, status,weixin_order_id,merchant_order_id) | |
select uid, rid, uniacid, tid, amount,'1519783300', status,weixin_order_id,merchant_order_id | |
from ims_checkin_payment where status = 1 and tid like '20180227%'; | |
select *,from_unixtime(dateline) from ims_checkin_payment where status = 1 and tid like '20180227%' and dateline='1519783300' or status = 1 and tid like '20180228%' order by dateline desc; | |
select openid from ims_mc_mapping_fans where uid in ( | |
SELECT uid | |
FROM ims_checkin_payment | |
WHERE dateline = '1519783300' AND tid LIKE '20180227%' OR tid LIKE '20180228%' AND status = 1 | |
GROUP BY uid | |
HAVING count(*) > 1 | |
); | |
select id from ims_checkin_payment where uid in ( | |
SELECT uid | |
FROM ims_checkin_payment | |
WHERE dateline = '1519783300' AND tid LIKE '20180227%' OR tid LIKE '20180228%' AND status = 1 | |
GROUP BY uid | |
HAVING count(*) > 1 | |
) and tid like '20180228%' and status=1; | |
delete from ims_checkin_payment where id in (''); | |
select *,from_unixtime(dateline) from we7.ims_superman_sign where date(from_unixtime(dateline))='2018-02-27' order by dateline desc; | |
update we7.ims_superman_sign set dateline = 1519783300 where date(from_unixtime(dateline))='2018-02-27' ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment