Skip to content

Instantly share code, notes, and snippets.

@tom-clickhouse
Created January 8, 2024 11:45
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/8537ad2016dffaadc2f031a30395074c to your computer and use it in GitHub Desktop.
Save tom-clickhouse/8537ad2016dffaadc2f031a30395074c to your computer and use it in GitHub Desktop.
uk_property_offers table
CREATE TABLE uk_property_offers
(
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 (postcode1, postcode2, street, addr1, addr2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment