|
|
|
|
|
CREATE SCHEMA IF NOT EXISTS "bird__debit_card_specializing"; |
|
|
|
|
|
|
|
|
CREATE TABLE "bird__debit_card_specializing"."customers" ( |
|
|
"CustomerID" BIGINT NOT NULL, |
|
|
"Segment" TEXT, |
|
|
"Currency" TEXT, |
|
|
CONSTRAINT "customers_pkey" PRIMARY KEY ("CustomerID") |
|
|
); |
|
|
|
|
|
|
|
|
CREATE TABLE "bird__debit_card_specializing"."gasstations" ( |
|
|
"GasStationID" BIGINT NOT NULL, |
|
|
"ChainID" BIGINT, |
|
|
"Country" TEXT, |
|
|
"Segment" TEXT, |
|
|
CONSTRAINT "gasstations_pkey" PRIMARY KEY ("GasStationID") |
|
|
); |
|
|
|
|
|
|
|
|
CREATE TABLE "bird__debit_card_specializing"."products" ( |
|
|
"ProductID" BIGINT NOT NULL, |
|
|
"Description" TEXT, |
|
|
CONSTRAINT "products_pkey" PRIMARY KEY ("ProductID") |
|
|
); |
|
|
|
|
|
|
|
|
CREATE TABLE "bird__debit_card_specializing"."transactions_1k" ( |
|
|
"TransactionID" BIGINT NOT NULL, |
|
|
"Date" DATE, |
|
|
"Time" TEXT, |
|
|
"CustomerID" BIGINT, |
|
|
"CardID" BIGINT, |
|
|
"GasStationID" BIGINT, |
|
|
"ProductID" BIGINT, |
|
|
"Amount" BIGINT, |
|
|
"Price" DOUBLE PRECISION, |
|
|
CONSTRAINT "transactions_1k_pkey" PRIMARY KEY ("TransactionID") |
|
|
); |
|
|
|
|
|
|
|
|
CREATE TABLE "bird__debit_card_specializing"."yearmonth" ( |
|
|
"CustomerID" BIGINT NOT NULL, |
|
|
"Date" TEXT NOT NULL, |
|
|
"Consumption" DOUBLE PRECISION, |
|
|
CONSTRAINT "yearmonth_pkey" PRIMARY KEY ("CustomerID", "Date") |
|
|
); |
|
|
|