SPB Git forge

spb/wp22_uqo

Public
6commits 1branches 0releases
142.4 MBsize
maindefault branch
1 h agolast push
TeX 55.1% Python 44.2%
2.5 KB · 73 lines sql
Raw Blame History
1-- SQLite schema of the Vrai Prix snapshot (read-only dump)2CREATE INDEX idx_tx_city_date ON transactions(city COLLATE NOCASE, date DESC, amount DESC)34CREATE INDEX idx_tx_date ON transactions(date)56CREATE INDEX idx_tx_geo ON transactions(lat, lng)78CREATE INDEX idx_tx_prov ON transactions(id_provinc)910CREATE INDEX idx_tx_recent ON transactions(date DESC, amount DESC) WHERE id_provinc IS NOT NULL AND street IS NOT NULL AND amount >= 500001112CREATE INDEX idx_units_geo ON units(lat, lng)1314CREATE INDEX idx_units_mun ON units(municipalite)1516CREATE INDEX idx_units_mun_nocase_est ON units(municipalite COLLATE NOCASE, est_2026)1718CREATE INDEX idx_units_mun_nocase_geo ON units(municipalite COLLATE NOCASE, lat, lng)1920CREATE TABLE leads (21  id INTEGER PRIMARY KEY AUTOINCREMENT, email TEXT, unit_id TEXT,22  estimate REAL, created_at TEXT DEFAULT (datetime('now'))23)2425CREATE TABLE market_index (26  month TEXT, type_prop TEXT, ppm2 REAL, idx REAL, n INTEGER,27  PRIMARY KEY (month, type_prop)28)2930CREATE TABLE sqlite_sequence(name,seq)3132CREATE TABLE transactions (33  id TEXT PRIMARY KEY, date TEXT, amount REAL, street TEXT, city TEXT,34  lat REAL, lng REAL, property_type TEXT, year_built INTEGER,35  floor_area REAL, building_type TEXT, id_provinc TEXT, valeur_role REAL,36  land_area REAL37)3839CREATE TABLE units (40  id_provinc TEXT PRIMARY KEY, adresse TEXT, apt TEXT, municipalite TEXT,41  arrond TEXT, code_mun TEXT, lat REAL, lng REAL, cubf INTEGER,42  cubf_libelle TEXT, type_prop TEXT, annee_construction INTEGER,43  annee_estimee TEXT, aire_etages_m2 REAL, superficie_terrain_m2 REAL,44  front_terrain_m REAL, nb_etages REAL, nb_logements INTEGER,45  nb_locaux_non_resid INTEGER, nb_chambres_locatives INTEGER,46  lien_physique TEXT, genre_construction TEXT,47  matricule TEXT, unite_voisinage TEXT, n_adresses INTEGER,48  dat_cond_marche TEXT,49  valeur_terrain REAL, valeur_batiment REAL, valeur_role REAL,50  valeur_anterieure REAL,51  est_2021 REAL, est_2022 REAL, est_2023 REAL, est_2024 REAL,52  est_2025 REAL, est_2026 REAL, p10 REAL, p90 REAL, est_hedo REAL53)5455CREATE TABLE units_est_prev(56  id_provinc TEXT,57  est_2026 REAL,58  p10 REAL,59  p90 REAL60)6162CREATE VIRTUAL TABLE units_fts USING fts5(63  adresse, municipalite, content='units', content_rowid='rowid',64  tokenize='unicode61 remove_diacritics 2')6566CREATE TABLE 'units_fts_config'(k PRIMARY KEY, v) WITHOUT ROWID6768CREATE TABLE 'units_fts_data'(id INTEGER PRIMARY KEY, block BLOB)6970CREATE TABLE 'units_fts_docsize'(id INTEGER PRIMARY KEY, sz BLOB)7172CREATE TABLE 'units_fts_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID73