-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changes TBL_RawData_01.sql
109 lines (80 loc) · 2.42 KB
/
Changes TBL_RawData_01.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
SELECT game_half,
COUNT(*)
FROM TBL_NFLPLAYS_plays2
GROUP BY game_half
ORDER BY COUNT(*) DESC
UPDATE TBL_NFLPLAYS_plays2
SET yardline_100 = NULL
WHERE yardline_100 = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN yardline_100 INT
UPDATE TBL_NFLPLAYS_plays2
SET quarter_seconds_remaining = NULL
WHERE quarter_seconds_remaining = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN quarter_seconds_remaining INT
UPDATE TBL_NFLPLAYS_plays2
SET half_seconds_remaining = NULL
WHERE half_seconds_remaining = 'NA'
UPDATE TBL_NFLPLAYS_plays2
SET half_seconds_remaining = '100'
WHERE half_seconds_remaining = '1.00E+03'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN half_seconds_remaining INT
UPDATE TBL_NFLPLAYS_plays2
SET game_seconds_remaining = NULL
WHERE game_seconds_remaining = 'NA'
UPDATE TBL_NFLPLAYS_plays2
SET game_seconds_remaining = '100'
WHERE game_seconds_remaining = '1.00E+03'
UPDATE TBL_NFLPLAYS_plays2
SET game_seconds_remaining = '200'
WHERE game_seconds_remaining = '2.00E+03'
UPDATE TBL_NFLPLAYS_plays2
SET game_seconds_remaining = '300'
WHERE game_seconds_remaining = '3.00E+03'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN game_seconds_remaining INT
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN drive INT
UPDATE TBL_NFLPLAYS_plays2
SET down = NULL
WHERE down = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN ydstogo INT
UPDATE TBL_NFLPLAYS_plays2
SET posteam_timeouts_remaining = NULL
WHERE posteam_timeouts_remaining = 'NA'
UPDATE TBL_NFLPLAYS_plays2
SET defteam_timeouts_remaining = NULL
WHERE defteam_timeouts_remaining = 'NA'
UPDATE TBL_NFLPLAYS_plays2
SET posteam_score = NULL
WHERE posteam_score = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN posteam_score INT
UPDATE TBL_NFLPLAYS_plays2
SET defteam_score = NULL
WHERE defteam_score = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN defteam_score INT
UPDATE TBL_NFLPLAYS_plays2
SET score_differential = NULL
WHERE score_differential = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN score_differential INT
UPDATE TBL_NFLPLAYS_plays2
SET wp = NULL
WHERE wp = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN wp FLOAT
UPDATE TBL_NFLPLAYS_plays2
SET away_wp = NULL
WHERE away_wp = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN away_wp FLOAT
UPDATE TBL_NFLPLAYS_plays2
SET wpa = NULL
WHERE wpa = 'NA'
ALTER TABLE TBL_NFLPLAYS_plays2
ALTER COLUMN wpa FLOAT