Last active
March 15, 2016 12:44
-
-
Save myui/b014337cc46e730976e9 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
INSERT OVERWRITE TABLE testing2 | |
SELECT | |
rowid() as rowid, | |
t1.id, | |
t1.stateholiday, t1.store, t1.promo, t1.dayofweek, t1.date, t1.schoolholiday, | |
SUBSTR(t1.date,1,4) as year, | |
SUBSTR(t1.date,6,2) as month, | |
SUBSTR(t1.date,9,2) as day, | |
t2.promo2sinceweek, | |
t2.competitionopensinceyear, | |
t2.assortment, | |
t2.promo2sinceyear, | |
t2.competitiondistance, | |
t2.promointerval, | |
t2.promo2, | |
t2.storetype, | |
t2.competitionopensincemonth | |
FROM | |
test_original t1 | |
JOIN store_raw t2 ON (t1.store = t2.store); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment