diff --git a/mnoskov/greenplum/Пет проект: DWH/Step_1_project_Initialization.sql b/mnoskov/greenplum/Пет проект: DWH/Step_1_project_Initialization.sql new file mode 100644 index 0000000..f76258c --- /dev/null +++ b/mnoskov/greenplum/Пет проект: DWH/Step_1_project_Initialization.sql @@ -0,0 +1,46 @@ +-- 1 +CREATE SCHEMA raw; +CREATE SCHEMA core; +CREATE SCHEMA dm; + +-- 2 +-- DROP TABLE IF EXISTS raw.users; +CREATE TABLE raw.users ( + id bigint, + name varchar(100), + age SMALLINT, + email varchar(100), + registration_date timestamptz +); + +--DROP TABLE IF EXISTS raw.courses; +CREATE TABLE raw.courses ( + id bigint, + title varchar(150), + category varchar(50), + created_at timestamptz +); + +--DROP TABLE IF EXISTS raw.lessons; +CREATE TABLE raw.lessons ( + id bigint, + course_id bigint, + title varchar(150), + duration_min SMALLINT +); + +--DROP TABLE IF EXISTS raw.enrollments; +CREATE TABLE raw.enrollments ( + id bigint, + user_id bigint, + course_id bigint, + enrolled_at timestamptz +); + +--DROP TABLE IF EXISTS raw.lesson_views; +CREATE TABLE raw.lesson_views ( + id bigint, + user_id bigint, + lesson_id bigint, + viewed_at timestamptz +); \ No newline at end of file diff --git a/mnoskov/greenplum/practice_distributed_by.txt b/mnoskov/greenplum/Практика greenplum/practice_distributed_by.txt similarity index 100% rename from mnoskov/greenplum/practice_distributed_by.txt rename to mnoskov/greenplum/Практика greenplum/practice_distributed_by.txt diff --git a/mnoskov/greenplum/practice_explain.txt b/mnoskov/greenplum/Практика greenplum/practice_explain.txt similarity index 100% rename from mnoskov/greenplum/practice_explain.txt rename to mnoskov/greenplum/Практика greenplum/practice_explain.txt diff --git a/mnoskov/greenplum/practice_external_sources_and_integration.txt b/mnoskov/greenplum/Практика greenplum/practice_external_sources_and_integration.txt similarity index 100% rename from mnoskov/greenplum/practice_external_sources_and_integration.txt rename to mnoskov/greenplum/Практика greenplum/practice_external_sources_and_integration.txt diff --git a/mnoskov/greenplum/practice_requests.txt b/mnoskov/greenplum/Практика greenplum/practice_requests.txt similarity index 100% rename from mnoskov/greenplum/practice_requests.txt rename to mnoskov/greenplum/Практика greenplum/practice_requests.txt