Self-hosting! (#49)

* added self-hosting
This commit is contained in:
Carl-Gerhard Lindesvärd
2024-08-28 09:28:44 +02:00
committed by GitHub
parent f0b7526847
commit df05e2dab3
70 changed files with 2310 additions and 272 deletions

View File

@@ -1,6 +1,17 @@
CREATE DATABASE IF NOT EXISTS openpanel;
CREATE TABLE openpanel.events_v2 (
CREATE TABLE IF NOT EXISTS openpanel.self_hosting
(
created_at Date,
domain String,
count UInt64
)
ENGINE = MergeTree()
ORDER BY (domain, created_at)
PARTITION BY toYYYYMM(created_at);
CREATE TABLE IF NOT EXISTS openpanel.events_v2 (
`id` UUID DEFAULT generateUUIDv4(),
`name` String,
`sdk_name` String,
@@ -80,7 +91,7 @@ SELECT
uniqState(profile_id) as profile_id,
project_id
FROM
events
events_v2
GROUP BY
date,
project_id;