Skip to content

Instantly share code, notes, and snippets.

@tom-clickhouse
Created February 7, 2024 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-clickhouse/26a97634a427a0e67c7bdfce4011f3d5 to your computer and use it in GitHub Desktop.
Save tom-clickhouse/26a97634a427a0e67c7bdfce4011f3d5 to your computer and use it in GitHub Desktop.
DDL
CREATE OR REPLACE TABLE uk_property_offers
(
id UInt32,
price UInt32,
date Date,
postcode1 LowCardinality(String),
postcode2 LowCardinality(String),
type Enum8('terraced' = 1, 'semi-detached' = 2, 'detached' = 3, 'flat' = 4, 'other' = 0),
is_new UInt8,
duration Enum8('freehold' = 1, 'leasehold' = 2, 'unknown' = 0),
addr1 String,
addr2 String,
street LowCardinality(String),
locality LowCardinality(String),
town LowCardinality(String),
district LowCardinality(String),
county LowCardinality(String)
)
ENGINE = ReplacingMergeTree(date)
ORDER BY (id);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment