attach 'pathname mega_rdb_path';

create table drawing_data
(   draw_dt     draw_dt_dom,
    no_1        elm_no_int,
    no_2        elm_no_int,
    no_3        elm_no_int,
    no_4        elm_no_int,
    no_5        elm_no_int,
    mega_no     elm_no_int,
    primary key (draw_dt)
);

commit;

create table draw_stats
(
    elm_no          elm_no_int,
    hit_count       integer,
    last_draw_no    integer,
    since_last      integer,
    curr_seq        integer,
    longest_seq     integer,
    pct_hits        double precision,
    max_btwn        integer,
    ave_btwn        double precision,
    primary key (elm_no)
);

commit;

create table mega_stats
(
    elm_no          elm_no_int,
    hit_count       integer,
    last_draw_no    integer,
    since_last      integer,
    curr_seq        integer,
    longest_seq     integer,
    pct_hits        double precision,
    max_btwn        integer,
    ave_btwn        double precision,
    primary key (elm_no)
);

commit;

