ClickHouse / ClickHouse/ClickHouse

inequality join condition

Open
#41,010 5 comments 0 reactions 0 assignees View on GitHub
comp-joins external question
Dominant language
C++
Stars
49.9k
Forks
9k
Avg merge
21h 32m
Merged PRs (30d)
515

Description

Hello everyone,

I'm quite new to clickhouse and recenlty I got stuck on a join condition and need a workaround.

I have two tables:
TimeSlots(Start datetime, End datetime)
Deliveries(DeliveryId, ...., StatusTimestamp, ....)

I need to granularize a query for the number of deliveries for the the preset periods.

SELECT slots.Start, Count(DeliveryId)
FROM Deliveries AS Dlr
inner JOIN TimeSlots AS slots
ON Dlr.StatusTimestamp > slots.Start AND Dlr.StatusTimestamp < slots.End
GROUP BY slots.Start

Aparently, the inequality join conditions are not supported.

Any ideas for workaround?

Thanks in advance

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.