Skip to content

Instantly share code, notes, and snippets.

@clucle
Last active December 20, 2022 03:43
Show Gist options
  • Save clucle/f20cde155275e8717e149a5dba851a2b to your computer and use it in GitHub Desktop.
Save clucle/f20cde155275e8717e149a5dba851a2b to your computer and use it in GitHub Desktop.
머신러닝용 임시 게시판
update team_b.my_train3 set ts_good = True WHERE trafficSource In ('web.whatsapp.com','voice.google.com', 'cse.google.com', 'apis.mail.yahoo.com', 'basecamp.com');
update team_b.my_train3 set ts_good = False WHERE trafficSource Not In ('web.whatsapp.com','voice.google.com', 'cse.google.com', 'apis.mail.yahoo.com', 'basecamp.com');
column 추가해주세요 ts_good
column 빼주세요 trafficCampaign
update team_b.my_train3 set th_category = '0' WHERE totalHits < 100000;
update team_b.my_train3 set th_category = '1' WHERE totalHits < 76;
update team_b.my_train3 set th_category = '2' WHERE totalHits < 26;
update team_b.my_train3 set th_category = '3' WHERE totalHits < 8;
totalHits 빼고 th_category 넣어주세용
update team_b.my_train3 set tp_category = '0' WHERE totalPageviews < 100000;
update team_b.my_train3 set tp_category = '1' WHERE totalPageviews < 77;
update team_b.my_train3 set tp_category = '2' WHERE totalPageviews < 33;
update team_b.my_train3 set tp_category = '3' WHERE totalPageviews < 21;
update team_b.my_train3 set tp_category = '4' WHERE totalPageviews < 17;
update team_b.my_train3 set tp_category = '5' WHERE totalPageviews < 11;
update team_b.my_train3 set tp_category = '6' WHERE totalPageviews < 7;
totalPageviews 빼고 tp_category 넣어주세용
update team_b.my_train3 set ppv_category = '0' WHERE productPagesViewed < 100000;
update team_b.my_train3 set ppv_category = '1' WHERE productPagesViewed < 7;
update team_b.my_train3 set ppv_category = '2' WHERE productPagesViewed < 1;
ppv_category 만 추가해주세용
update team_b.my_train2 set isMon = True WHERE isoweek = 1;
update team_b.my_train2 set isTue = True WHERE isoweek = 2;
update team_b.my_train2 set isWed = True WHERE isoweek = 3;
update team_b.my_train2 set isThu = True WHERE isoweek = 4;
update team_b.my_train2 set isFri = True WHERE isoweek = 5;
update team_b.my_train2 set isSat = True WHERE isoweek = 6;
update team_b.my_train2 set isSun = True WHERE isoweek = 7;
update team_b.my_train2 set isMon = False WHERE isoweek != 1;
update team_b.my_train2 set isTue = False WHERE isoweek != 2;
update team_b.my_train2 set isWed = False WHERE isoweek != 3;
update team_b.my_train2 set isThu = False WHERE isoweek != 4;
update team_b.my_train2 set isFri = False WHERE isoweek != 5;
update team_b.my_train2 set isSat = False WHERE isoweek != 6;
update team_b.my_train2 set isSun = False WHERE isoweek != 7;
@clucle
Copy link
Author

clucle commented Sep 19, 2022

column 추가해주세요 ts_good
column 빼주세요 trafficCampaign

@clucle
Copy link
Author

clucle commented Sep 19, 2022

update team_b.my_train3 set th_category = '0' WHERE totalHits < 100000;
update team_b.my_train3 set th_category = '1' WHERE totalHits < 76;
update team_b.my_train3 set th_category = '2' WHERE totalHits < 26;
update team_b.my_train3 set th_category = '3' WHERE totalHits < 8;

@clucle
Copy link
Author

clucle commented Sep 19, 2022

totalHits 빼고 th_category 넣어주세용

@clucle
Copy link
Author

clucle commented Sep 19, 2022

update team_b.my_train3 set tp_category = '0' WHERE totalPageviews < 100000;
update team_b.my_train3 set tp_category = '1' WHERE totalPageviews < 77;
update team_b.my_train3 set tp_category = '2' WHERE totalPageviews < 33;
update team_b.my_train3 set tp_category = '3' WHERE totalPageviews < 21;
update team_b.my_train3 set tp_category = '4' WHERE totalPageviews < 17;
update team_b.my_train3 set tp_category = '5' WHERE totalPageviews < 11;
update team_b.my_train3 set tp_category = '6' WHERE totalPageviews < 7;

@clucle
Copy link
Author

clucle commented Sep 19, 2022

totalPageviews 빼고 tp_category 넣어주세용

@clucle
Copy link
Author

clucle commented Sep 19, 2022

update team_b.my_train3 set ppv_category = '0' WHERE productPagesViewed < 100000;
update team_b.my_train3 set ppv_category = '1' WHERE productPagesViewed < 7;
update team_b.my_train3 set ppv_category = '2' WHERE productPagesViewed < 1;

@clucle
Copy link
Author

clucle commented Sep 19, 2022

ppv_category 만 추가해주세용

@hon99oo
Copy link

hon99oo commented Sep 19, 2022

update team_b.my_train2 set isMon = True WHERE isoweek = 1;
update team_b.my_train2 set isTue = True WHERE isoweek = 2;
update team_b.my_train2 set isWed = True WHERE isoweek = 3;
update team_b.my_train2 set isThu = True WHERE isoweek = 4;
update team_b.my_train2 set isFri = True WHERE isoweek = 5;
update team_b.my_train2 set isSat = True WHERE isoweek = 6;
update team_b.my_train2 set isSun = True WHERE isoweek = 7;
update team_b.my_train2 set isMon = False WHERE isoweek != 1;
update team_b.my_train2 set isTue = False WHERE isoweek != 2;
update team_b.my_train2 set isWed = False WHERE isoweek != 3;
update team_b.my_train2 set isThu = False WHERE isoweek != 4;
update team_b.my_train2 set isFri = False WHERE isoweek != 5;
update team_b.my_train2 set isSat = False WHERE isoweek != 6;
update team_b.my_train2 set isSun = False WHERE isoweek != 7;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment