home / football

h2h_record

0 rows where last_match_id = 26

✎ View and edit SQL

This data as json

0 records

CREATE TABLE h2h_record (
            h2h_id INTEGER NOT NULL,
            team_a_id INTEGER NOT NULL,
            team_b_id INTEGER NOT NULL,
            date DATE NOT NULL,
            total_matches INTEGER NOT NULL,
            wins_a INTEGER NOT NULL,
            wins_b INTEGER NOT NULL,
            draws INTEGER NOT NULL,
            goals_a INTEGER NOT NULL,
            goals_b INTEGER NOT NULL,
            last_match_date DATE,
            last_result VARCHAR(1),
            last_match_id INTEGER,
            competition_id INTEGER,
            created_at DATETIME NOT NULL,
            updated_at DATETIME NOT NULL,
            created_by_run_id INTEGER,
            updated_by_run_id INTEGER,
            source_id INTEGER NOT NULL,
            source_raw_key VARCHAR(512),
            CONSTRAINT pk_h2h_record PRIMARY KEY (h2h_id),
            CONSTRAINT fk_h2h_record_team_a FOREIGN KEY(team_a_id) REFERENCES team (team_id),
            CONSTRAINT fk_h2h_record_team_b FOREIGN KEY(team_b_id) REFERENCES team (team_id),
            CONSTRAINT fk_h2h_record_source FOREIGN KEY(source_id) REFERENCES data_source (source_id),
            CONSTRAINT fk_h2h_record_match FOREIGN KEY(last_match_id) REFERENCES match (match_id),
            CONSTRAINT fk_h2h_record_competition FOREIGN KEY(competition_id) REFERENCES competition (competition_id)
        );
Powered by Datasette · Queries took 884.385ms