-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschematic.pgsql
More file actions
973 lines (931 loc) · 45.3 KB
/
Copy pathschematic.pgsql
File metadata and controls
973 lines (931 loc) · 45.3 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
create table soccer_teams
(
index bigint,
squad_id text,
name text,
season text,
record text,
position text,
points text,
league text,
manager text,
country text,
gender text,
goals_scored text,
goals_against text,
goal_difference text,
expected_goals text,
expected_goals_against text,
expected_goal_difference text,
home_record text,
home_games text,
away_record text,
away_games text,
home_wins text,
home_draws text,
home_losses text,
away_wins text,
away_draws text,
away_losses text,
home_points text,
away_points text
);
alter table soccer_teams
owner to ubuntu;
create index ix_soccer_teams_index
on soccer_teams (index);
create table soccer_games
(
index text
);
alter table soccer_games
owner to ubuntu;
create index ix_soccer_games_index
on soccer_games (index);
create table nhl_teams
(
index text,
abbreviation text,
average_age double precision,
games_played bigint,
goals_against text,
goals_for bigint,
losses bigint,
name text,
overtime_losses bigint,
pdo_at_even_strength text,
penalty_killing_percentage double precision,
points bigint,
points_percentage double precision,
power_play_goals bigint,
power_play_goals_against bigint,
power_play_opportunities bigint,
power_play_opportunities_against bigint,
power_play_percentage double precision,
rank bigint,
save_percentage double precision,
shooting_percentage double precision,
short_handed_goals bigint,
short_handed_goals_against bigint,
shots_against bigint,
shots_on_goal bigint,
simple_rating_system double precision,
strength_of_schedule double precision,
total_goals_per_game double precision,
wins bigint,
year bigint
);
alter table nhl_teams
owner to ubuntu;
create index ix_nhl_teams_index
on nhl_teams (index);
create table nba_teams
(
index text,
abbreviation text,
assists bigint,
blocks bigint,
defensive_rebounds bigint,
field_goal_attempts bigint,
field_goal_percentage double precision,
field_goals bigint,
free_throw_attempts bigint,
free_throw_percentage double precision,
free_throws bigint,
games_played bigint,
minutes_played bigint,
name text,
offensive_rebounds bigint,
opp_assists bigint,
opp_blocks bigint,
opp_defensive_rebounds bigint,
opp_field_goal_attempts bigint,
opp_field_goal_percentage double precision,
opp_field_goals bigint,
opp_free_throw_attempts bigint,
opp_free_throw_percentage double precision,
opp_free_throws bigint,
opp_offensive_rebounds bigint,
opp_personal_fouls bigint,
opp_points bigint,
opp_steals bigint,
opp_three_point_field_goal_attempts bigint,
opp_three_point_field_goal_percentage double precision,
opp_three_point_field_goals bigint,
opp_total_rebounds bigint,
opp_turnovers bigint,
opp_two_point_field_goal_attempts bigint,
opp_two_point_field_goal_percentage double precision,
opp_two_point_field_goals bigint,
personal_fouls bigint,
points bigint,
rank bigint,
steals bigint,
three_point_field_goal_attempts bigint,
three_point_field_goal_percentage double precision,
three_point_field_goals bigint,
total_rebounds bigint,
turnovers bigint,
two_point_field_goal_attempts bigint,
two_point_field_goal_percentage double precision,
two_point_field_goals bigint,
year bigint
);
alter table nba_teams
owner to ubuntu;
create index ix_nba_teams_index
on nba_teams (index);
create table mlb_teams
(
index text,
abbreviation text,
at_bats bigint,
average_batter_age double precision,
average_pitcher_age double precision,
away_losses bigint,
away_record text,
away_wins bigint,
balks bigint,
bases_on_balls bigint,
bases_on_walks_given bigint,
bases_on_walks_given_per_nine_innings double precision,
batters_faced bigint,
batting_average double precision,
complete_game_shutouts bigint,
complete_games bigint,
doubles bigint,
earned_runs_against double precision,
earned_runs_against_plus bigint,
extra_inning_losses bigint,
extra_inning_record text,
extra_inning_wins bigint,
fielding_independent_pitching double precision,
games bigint,
games_finished bigint,
grounded_into_double_plays bigint,
hit_pitcher bigint,
hits bigint,
hits_allowed bigint,
hits_per_nine_innings double precision,
home_losses bigint,
home_record text,
home_runs bigint,
home_runs_against bigint,
home_runs_per_nine_innings double precision,
home_wins bigint,
innings_pitched double precision,
intentional_bases_on_balls bigint,
interleague_record text,
last_ten_games_record text,
last_thirty_games_record text,
last_twenty_games_record text,
league text,
losses bigint,
losses_last_ten_games text,
losses_last_thirty_games text,
losses_last_twenty_games text,
losses_vs_left_handed_pitchers bigint,
losses_vs_right_handed_pitchers bigint,
losses_vs_teams_over_500 bigint,
losses_vs_teams_under_500 bigint,
luck bigint,
name text,
number_of_pitchers bigint,
number_players_used bigint,
on_base_percentage double precision,
on_base_plus_slugging_percentage double precision,
on_base_plus_slugging_percentage_plus bigint,
opposing_runners_left_on_base bigint,
plate_appearances bigint,
pythagorean_win_loss text,
rank bigint,
record_vs_left_handed_pitchers text,
record_vs_right_handed_pitchers text,
record_vs_teams_over_500 text,
record_vs_teams_under_500 text,
run_difference double precision,
runners_left_on_base bigint,
runs double precision,
runs_against double precision,
runs_allowed_per_game double precision,
runs_batted_in bigint,
sacrifice_flies bigint,
sacrifice_hits bigint,
saves bigint,
shutouts bigint,
simple_rating_system double precision,
single_run_losses bigint,
single_run_record text,
single_run_wins bigint,
slugging_percentage double precision,
stolen_bases bigint,
streak text,
strength_of_schedule double precision,
strikeouts bigint,
strikeouts_per_base_on_balls double precision,
strikeouts_per_nine_innings double precision,
times_caught_stealing bigint,
times_hit_by_pitch bigint,
times_struck_out bigint,
total_bases bigint,
total_runs bigint,
triples bigint,
whip double precision,
wild_pitches bigint,
win_percentage double precision,
wins bigint,
wins_last_ten_games text,
wins_last_thirty_games text,
wins_last_twenty_games text,
wins_vs_left_handed_pitchers bigint,
wins_vs_right_handed_pitchers bigint,
wins_vs_teams_over_500 bigint,
wins_vs_teams_under_500 bigint,
year bigint,
wins int
);
alter table mlb_teams
owner to ubuntu;
create index ix_mlb_teams_index
on mlb_teams (index);
create table nfl_teams
(
index text,
abbreviation text,
defensive_simple_rating_system double precision,
first_downs bigint,
first_downs_from_penalties bigint,
fumbles bigint,
games_played bigint,
interceptions bigint,
losses bigint,
margin_of_victory double precision,
name text,
offensive_simple_rating_system double precision,
pass_attempts bigint,
pass_completions bigint,
pass_first_downs bigint,
pass_net_yards_per_attempt double precision,
pass_touchdowns bigint,
pass_yards bigint,
penalties bigint,
percent_drives_with_points double precision,
percent_drives_with_turnovers double precision,
plays bigint,
points_against bigint,
points_contributed_by_offense double precision,
points_difference bigint,
points_for bigint,
post_season_result text,
rank bigint,
rush_attempts bigint,
rush_first_downs bigint,
rush_touchdowns bigint,
rush_yards bigint,
rush_yards_per_attempt double precision,
simple_rating_system double precision,
strength_of_schedule double precision,
turnovers bigint,
win_percentage double precision,
wins bigint,
yards bigint,
yards_from_penalties bigint,
yards_per_play double precision,
year bigint
);
alter table nfl_teams
owner to ubuntu;
create index ix_nfl_teams_index
on nfl_teams (index);
create table nba_players
(
index text,
and_ones text,
assist_percentage double precision,
assists bigint,
block_percentage double precision,
blocking_fouls text,
blocks bigint,
box_plus_minus double precision,
center_percentage bigint,
defensive_box_plus_minus double precision,
defensive_rebound_percentage double precision,
defensive_rebounds bigint,
defensive_win_shares double precision,
dunks text,
effective_field_goal_percentage double precision,
field_goal_attempts bigint,
field_goal_perc_sixteen_foot_plus_two_pointers double precision,
field_goal_perc_ten_to_sixteen_feet double precision,
field_goal_perc_three_to_ten_feet double precision,
field_goal_perc_zero_to_three_feet double precision,
field_goal_percentage double precision,
field_goals bigint,
free_throw_attempt_rate double precision,
free_throw_attempts bigint,
free_throw_percentage double precision,
free_throws bigint,
games_played bigint,
games_started bigint,
half_court_heaves bigint,
half_court_heaves_made bigint,
height text,
lost_ball_turnovers text,
minutes_played bigint,
nationality text,
net_plus_minus text,
offensive_box_plus_minus double precision,
offensive_fouls text,
offensive_rebound_percentage double precision,
offensive_rebounds bigint,
offensive_win_shares double precision,
on_court_plus_minus text,
other_turnovers text,
passing_turnovers text,
percentage_field_goals_as_dunks text,
percentage_of_three_pointers_from_corner text,
percentage_shots_three_pointers text,
percentage_shots_two_pointers text,
percentage_sixteen_foot_plus_two_pointers double precision,
percentage_ten_to_sixteen_footers double precision,
percentage_three_to_ten_footers double precision,
percentage_zero_to_three_footers double precision,
personal_fouls bigint,
player_efficiency_rating double precision,
player_id text,
point_guard_percentage bigint,
points bigint,
points_generated_by_assists text,
position text,
power_forward_percentage bigint,
salary bigint,
shooting_distance double precision,
shooting_fouls text,
shooting_fouls_drawn text,
shooting_guard_percentage bigint,
shots_blocked text,
small_forward_percentage bigint,
steal_percentage double precision,
steals bigint,
take_fouls text,
team_abbreviation text,
three_point_attempt_rate double precision,
three_point_attempts bigint,
three_point_percentage double precision,
three_point_shot_percentage_from_corner text,
three_pointers bigint,
three_pointers_assisted_percentage text,
total_rebound_percentage double precision,
total_rebounds bigint,
true_shooting_percentage double precision,
turnover_percentage double precision,
turnovers bigint,
two_point_attempts bigint,
two_point_percentage double precision,
two_pointers bigint,
two_pointers_assisted_percentage text,
usage_percentage double precision,
value_over_replacement_player double precision,
weight bigint,
win_shares double precision,
win_shares_per_48_minutes double precision,
year bigint,
team text,
player_name text,
birth_date timestamp
);
alter table nba_players
owner to ubuntu;
create index ix_nba_players_index
on nba_players (index);
create table nfl_players
(
index text,
adjusted_net_yards_per_attempt_index text,
adjusted_net_yards_per_pass_attempt text,
adjusted_yards_per_attempt text,
adjusted_yards_per_attempt_index text,
all_purpose_yards double precision,
approximate_value bigint,
assists_on_tackles double precision,
attempted_passes text,
birth_date text,
blocked_punts text,
catch_percentage text,
completed_passes text,
completion_percentage_index text,
espn_qbr text,
extra_point_percentage text,
extra_points_attempted text,
extra_points_made text,
field_goal_percentage text,
field_goals_attempted text,
field_goals_made text,
fifty_plus_yard_field_goal_attempts text,
fifty_plus_yard_field_goals_made text,
fourth_quarter_comebacks text,
fourty_to_fourty_nine_yard_field_goal_attempts text,
fourty_to_fourty_nine_yard_field_goals_made text,
fumbles double precision,
fumbles_forced double precision,
fumbles_recovered double precision,
fumbles_recovered_for_touchdown double precision,
game_winning_drives text,
games double precision,
games_started double precision,
height text,
interception_percentage text,
interception_percentage_index text,
interceptions double precision,
interceptions_returned_for_touchdown double precision,
interceptions_thrown text,
kickoff_return_touchdown double precision,
kickoff_return_yards double precision,
kickoff_returns double precision,
less_than_nineteen_yards_field_goal_attempts text,
less_than_nineteen_yards_field_goals_made text,
longest_field_goal_made text,
longest_interception_return double precision,
longest_kickoff_return double precision,
longest_pass text,
longest_punt text,
longest_punt_return text,
longest_reception text,
longest_rush text,
name text,
net_yards_per_attempt_index text,
net_yards_per_pass_attempt text,
passer_rating_index text,
passes_defended double precision,
passing_completion text,
passing_touchdown_percentage text,
passing_touchdowns text,
passing_yards text,
passing_yards_per_attempt text,
player_id text,
position text,
punt_return_touchdown text,
punt_return_yards text,
punt_returns text,
punts text,
qb_record text,
quarterback_rating text,
receiving_touchdowns text,
receiving_yards text,
receiving_yards_per_game text,
receiving_yards_per_reception text,
receptions text,
receptions_per_game text,
rush_attempts text,
rush_attempts_per_game text,
rush_touchdowns text,
rush_yards text,
rush_yards_per_attempt text,
rush_yards_per_game text,
rushing_and_receiving_touchdowns text,
sack_percentage text,
sack_percentage_index text,
sacks double precision,
safeties text,
season text,
tackles double precision,
team_abbreviation text,
thirty_to_thirty_nine_yard_field_goal_attempts text,
thirty_to_thirty_nine_yard_field_goals_made text,
times_pass_target text,
times_sacked text,
total_punt_yards text,
touchdown_percentage_index text,
touches text,
twenty_to_twenty_nine_yard_field_goal_attempts text,
twenty_to_twenty_nine_yard_field_goals_made text,
weight bigint,
yards_from_scrimmage text,
yards_lost_to_sacks text,
yards_per_attempt_index text,
yards_per_completed_pass text,
yards_per_game_played text,
yards_per_kickoff_return double precision,
yards_per_punt text,
yards_per_punt_return text,
yards_per_touch text,
yards_recovered_from_fumble double precision,
yards_returned_from_interception double precision,
year bigint,
team text,
player_name text
);
alter table nfl_players
owner to ubuntu;
create index ix_nfl_players_index
on nfl_players (index);
create table nhl_players
(
index text,
adjusted_assists bigint,
adjusted_goals bigint,
adjusted_goals_against_average text,
adjusted_goals_created bigint,
adjusted_points bigint,
age double precision,
assists bigint,
average_time_on_ice text,
blocks_at_even_strength double precision,
corsi_against double precision,
corsi_for double precision,
corsi_for_percentage double precision,
defensive_point_shares double precision,
defensive_zone_start_percentage double precision,
even_strength_assists bigint,
even_strength_goals bigint,
even_strength_goals_allowed text,
even_strength_save_percentage text,
even_strength_shots_faced text,
faceoff_losses double precision,
faceoff_percentage double precision,
faceoff_wins double precision,
fenwick_against double precision,
fenwick_for double precision,
fenwick_for_percentage double precision,
game_winning_goals bigint,
games_played bigint,
giveaways double precision,
goal_against_percentage_relative text,
goalie_point_shares text,
goals bigint,
goals_against text,
goals_against_average text,
goals_against_on_ice double precision,
goals_created bigint,
goals_for_on_ice double precision,
goals_saved_above_average text,
height text,
hits_at_even_strength double precision,
league text,
losses text,
minutes text,
name text,
offensive_point_shares double precision,
offensive_zone_start_percentage double precision,
pdo double precision,
penalties_in_minutes bigint,
player_id text,
plus_minus bigint,
point_shares double precision,
points bigint,
power_play_assists bigint,
power_play_goals bigint,
power_play_goals_against_on_ice bigint,
power_play_goals_allowed text,
power_play_goals_for_on_ice bigint,
power_play_save_percentage text,
power_play_shots_faced text,
quality_start_percentage text,
quality_starts text,
really_bad_starts text,
relative_corsi_for_percentage double precision,
relative_fenwick_for_percentage double precision,
save_percentage text,
save_percentage_on_ice text,
saves text,
season text,
shooting_percentage double precision,
shooting_percentage_on_ice double precision,
shootout_attempts text,
shootout_goals text,
shootout_misses text,
shootout_percentage text,
short_handed_assists bigint,
short_handed_goals bigint,
short_handed_goals_allowed text,
short_handed_save_percentage text,
short_handed_shots_faced text,
shots_against text,
shots_on_goal bigint,
shutouts text,
takeaways double precision,
team_abbreviation text,
ties_plus_overtime_loss text,
time_on_ice bigint,
time_on_ice_even_strength double precision,
total_goals_against_on_ice bigint,
total_goals_for_on_ice bigint,
total_shots double precision,
weight bigint,
wins text,
year bigint,
team text,
player_name text
);
alter table nhl_players
owner to ubuntu;
create index ix_nhl_players_index
on nhl_players (index);
create table soccer_players
(
index text,
name text,
player_id text,
nationality text,
position text,
age bigint,
matches_played bigint,
starts bigint,
minutes bigint,
goals bigint,
assists bigint,
penalty_kicks bigint,
penalty_kick_attempts bigint,
yellow_cards bigint,
red_cards bigint,
goals_per_90 double precision,
assists_per_90 double precision,
goals_and_assists_per_90 double precision,
goals_non_penalty_per_90 double precision,
goals_and_assists_non_penalty_per_90 double precision,
expected_goals double precision,
expected_goals_non_penalty double precision,
expected_assists double precision,
expected_goals_per_90 double precision,
expected_assists_per_90 double precision,
expected_goals_and_assists_per_90 double precision,
expected_goals_non_penalty_per_90 double precision,
expected_goals_and_assists_non_penalty_per_90 double precision,
own_goals text,
goals_against text,
own_goals_against text,
goals_against_per_90 text,
shots_on_target_against text,
saves text,
save_percentage text,
wins text,
draws text,
losses text,
clean_sheets text,
clean_sheet_percentage text,
penalty_kicks_attempted text,
penalty_kicks_allowed text,
penalty_kicks_saved text,
penalty_kicks_missed text,
free_kick_goals_against text,
corner_kick_goals_against text,
post_shot_expected_goals text,
post_shot_expected_goals_per_shot text,
post_shot_expected_goals_minus_allowed text,
launches_completed text,
launches_attempted text,
launch_completion_percentage text,
keeper_passes_attempted text,
throws_attempted text,
launch_percentage text,
average_keeper_pass_length text,
goal_kicks_attempted text,
goal_kick_launch_percentage text,
average_goal_kick_length text,
opponent_cross_attempts text,
opponent_cross_stops text,
opponent_cross_stop_percentage text,
keeper_actions_outside_penalty_area text,
keeper_actions_outside_penalty_area_per_90 text,
average_keeper_action_outside_penalty_distance text,
shots text,
shots_on_target text,
free_kick_shots text,
shots_on_target_percentage text,
shots_per_90 text,
shots_on_target_per_90 text,
goals_per_shot text,
goals_per_shot_on_target text,
expected_goals_non_penalty_per_shot text,
goals_minus_expected text,
non_penalty_minus_expected_non_penalty text,
assists_minus_expected text,
key_passes text,
passes_completed text,
passes_attempted text,
pass_completion text,
short_passes_completed text,
short_passes_attempted text,
short_pass_completion text,
medium_passes_completed text,
medium_passes_attempted text,
medium_pass_completion text,
long_passes_completed text,
long_passes_attempted text,
long_pass_completion text,
left_foot_passes text,
right_foot_passes text,
free_kick_passes text,
through_balls text,
corner_kicks text,
throw_ins text,
final_third_passes text,
penalty_area_passes text,
penalty_area_crosses text,
minutes_per_match text,
minutes_played_percentage text,
nineties_played text,
minutes_per_start text,
subs text,
minutes_per_sub text,
unused_sub text,
points_per_match text,
goals_scored_on_pitch text,
goals_against_on_pitch text,
goal_difference_on_pitch text,
goal_difference_on_pitch_per_90 text,
net_difference_on_pitch_per_90 text,
expected_goals_on_pitch text,
expected_goals_against_on_pitch text,
expected_goal_difference text,
expected_goal_difference_per_90 text,
net_expected_goal_difference_per_90 text,
soft_reds text,
fouls_committed text,
fouls_drawn text,
offsides text,
crosses text,
tackles_won text,
interceptions text,
penalty_kicks_won text,
penalty_kicks_conceded text,
successful_dribbles text,
attempted_dribbles text,
dribble_success_rate text,
players_dribbled_past text,
nutmegs text,
dribblers_tackled text,
dribblers_contested text,
tackle_percentage text,
times_dribbled_past text,
team text,
player_name text
);
alter table soccer_players
owner to ubuntu;
create index ix_soccer_players_index
on soccer_players (index);
create table mlb_players
(
index text,
assists bigint,
at_bats bigint,
bases_on_balls bigint,
batting_average double precision,
birth_date text,
complete_games bigint,
defensive_chances bigint,
defensive_runs_saved_above_average bigint,
defensive_runs_saved_above_average_per_innings bigint,
double_plays_turned bigint,
doubles bigint,
errors bigint,
fielding_percentage double precision,
games bigint,
games_catcher bigint,
games_center_fielder bigint,
games_designated_hitter bigint,
games_first_baseman bigint,
games_in_batting_order bigint,
games_in_defensive_lineup bigint,
games_left_fielder bigint,
games_outfielder bigint,
games_pinch_hitter bigint,
games_pinch_runner bigint,
games_pitcher bigint,
games_right_fielder bigint,
games_second_baseman bigint,
games_shortstop bigint,
games_started bigint,
games_third_baseman bigint,
grounded_into_double_plays bigint,
height text,
hits bigint,
home_runs bigint,
innings_played double precision,
intentional_bases_on_balls bigint,
league_fielding_percentage double precision,
league_range_factor_per_game double precision,
league_range_factor_per_nine_innings double precision,
name text,
nationality text,
on_base_percentage double precision,
on_base_plus_slugging_percentage double precision,
on_base_plus_slugging_percentage_plus bigint,
plate_appearances bigint,
player_id text,
position text,
putouts bigint,
range_factor_per_game double precision,
range_factor_per_nine_innings double precision,
runs bigint,
runs_batted_in bigint,
sacrifice_flies bigint,
sacrifice_hits bigint,
season text,
slugging_percentage double precision,
stolen_bases bigint,
team_abbreviation text,
times_caught_stealing bigint,
times_hit_by_pitch bigint,
times_struck_out bigint,
total_bases bigint,
total_fielding_runs_above_average bigint,
total_fielding_runs_above_average_per_innings bigint,
triples bigint,
weight bigint,
balks double precision,
bases_on_balls_given double precision,
bases_on_balls_given_per_nine_innings double precision,
batters_faced double precision,
batters_struckout_per_nine_innings double precision,
earned_runs_allowed double precision,
era double precision,
era_plus double precision,
fielding_independent_pitching double precision,
games_finished double precision,
hits_against_per_nine_innings double precision,
hits_allowed double precision,
home_runs_against_per_nine_innings double precision,
home_runs_allowed double precision,
intentional_bases_on_balls_given double precision,
losses double precision,
runs_allowed double precision,
saves double precision,
shutouts double precision,
strikeouts double precision,
strikeouts_thrown_per_walk double precision,
times_hit_player double precision,
whip double precision,
wild_pitches bigint,
win_percentage text,
wins double precision,
year bigint,
team text,
player_name text
);
alter table mlb_players
owner to ubuntu;
create index ix_mlb_players_index
on mlb_players (index);
create table nba_games
(
index bigint,
boxscore text,
away_name text,
away_abbr text,
away_score bigint,
home_name text,
home_abbr text,
home_score bigint,
winning_name text,
winning_abbr text,
losing_name text,
losing_abbr text,
date timestamp
);
alter table nba_games
owner to ubuntu;
create index ix_nba_games_index
on nba_games (index);
create table nhl_games
(
index bigint,
boxscore text,
away_name text,
away_abbr text,
away_score bigint,
home_name text,
home_abbr text,
home_score bigint,
winning_name text,
winning_abbr text,
losing_name text,
losing_abbr text,
date timestamp
);
alter table nhl_games
owner to ubuntu;
create index ix_nhl_games_index
on nhl_games (index);
create table mlb_games
(
index bigint,
boxscore text,
away_name text,
away_abbr text,
away_score bigint,
home_name text,
home_abbr text,
home_score bigint,
winning_name text,
winning_abbr text,
losing_name text,
losing_abbr text,
date timestamp
);
alter table mlb_games
owner to ubuntu;
create index ix_mlb_games_index
on mlb_games (index);
UPDATE nba_teams SET wins = (SELECT COUNT(*) FROM nba_games WHERE nba_games.winning_abbr = nba_teams.abbreviation AND EXTRACT(year FROM date) = nba_teams.year)