home / cp40x

names

2 rows where case_id = 2041220

✎ View and edit SQL

This data as json, CSV (advanced)

id ▼ case_id role surname forename occupation place_id raw_segment seq
4046557 2041220 2041220 plaintiff Smyth John gent 600820 600820 Smyth, John, of Wigton, gent 0
4046558 2041220 2041220 defendant Sturgis Robert gent 631726 631726 Sturgis, Robert, of Same, gent 0

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE names (
    id INTEGER PRIMARY KEY AUTOINCREMENT,
    case_id INTEGER NOT NULL REFERENCES cases(id) ON DELETE CASCADE,
    role TEXT NOT NULL CHECK (role IN ('plaintiff', 'defendant')),
    surname TEXT NOT NULL,
    forename TEXT,
    occupation TEXT,
    place_id INTEGER REFERENCES places(id),
    raw_segment TEXT NOT NULL,
    seq INTEGER NOT NULL DEFAULT 0
);
CREATE INDEX idx_names_case_id ON names(case_id);
CREATE INDEX idx_names_surname ON names(surname);
CREATE INDEX idx_names_place_id ON names(place_id);
CREATE INDEX idx_names_role_surname ON names(role, surname);
Powered by Datasette · Queries took 13.888ms