File size: 1,390 Bytes
562924d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
-- Schema: bird__debit_card_specializing
CREATE SCHEMA IF NOT EXISTS "bird__debit_card_specializing";

-- Table: customers
CREATE TABLE "bird__debit_card_specializing"."customers" (
    "CustomerID" BIGINT NOT NULL,
    "Segment" TEXT,
    "Currency" TEXT,
    CONSTRAINT "customers_pkey" PRIMARY KEY ("CustomerID")
);

-- Table: gasstations
CREATE TABLE "bird__debit_card_specializing"."gasstations" (
    "GasStationID" BIGINT NOT NULL,
    "ChainID" BIGINT,
    "Country" TEXT,
    "Segment" TEXT,
    CONSTRAINT "gasstations_pkey" PRIMARY KEY ("GasStationID")
);

-- Table: products
CREATE TABLE "bird__debit_card_specializing"."products" (
    "ProductID" BIGINT NOT NULL,
    "Description" TEXT,
    CONSTRAINT "products_pkey" PRIMARY KEY ("ProductID")
);

-- Table: transactions_1k
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")
);

-- Table: yearmonth
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")
);