Работа над ошибками - 3: Создай витрину inactive_users_summary & Задание 5: Напиши SQL-запросы к витринам

This commit is contained in:
mnoskov
2026-05-25 10:15:32 +03:00
parent b613634f73
commit 24bf412aeb
2 changed files with 4 additions and 4 deletions
@@ -6,7 +6,7 @@ ON CLUSTER clickhouse_cluster
name String, name String,
email String, email String,
age UInt8, age UInt8,
registered_courses_count UInt8, registered_courses_count UInt32,
registration_date DateTime registration_date DateTime
) )
ENGINE = ReplicatedMergeTree( ENGINE = ReplicatedMergeTree(
@@ -71,5 +71,5 @@ VALUES
(17, 'Quinn', 24, 'quinn@gmail.com', '2023-03-19 23:00:00'), (17, 'Quinn', 24, 'quinn@gmail.com', '2023-03-19 23:00:00'),
(18, 'Rita', 27, 'rita@mail.com', '2023-03-31 23:00:00'), (18, 'Rita', 27, 'rita@mail.com', '2023-03-31 23:00:00'),
(19, 'Sam', 30, 'sam@gmail.com', '2023-04-09 23:00:00'), (19, 'Sam', 30, 'sam@gmail.com', '2023-04-09 23:00:00'),
(21, 'Tinanal', 22, 'tinanal@mail.com', '2023-04-19 23:02:00') (21, 'Tinanal', 22, 'tinanal@mail.com', '2023-04-19 23:02:00'),
(22, 'Anal2', 24, 'tinanal222@mail.com', '2023-04-19 23:22:00'); (22, 'Anal2', 24, 'tinanal222@mail.com', '2023-04-19 23:22:00');
@@ -1,7 +1,7 @@
-- Топ 5 самых непросматреваемых уроков -- Топ 5 самых непросматреваемых уроков
SELECT SELECT
any(lesson_title), any(lesson_title) AS lesson_title,
any(course_title), any(course_title) AS course_title,
countMerge(total_views) AS total_views countMerge(total_views) AS total_views
FROM FROM
mnoskov.lesson_popularity_summary mnoskov.lesson_popularity_summary