Attached are the following files for your review: Java Source Code – The code for the task. Code Explanation – A brief explanation of the code and its logic. ClickHouse DB Design – A document with the design for the ClickHouse DB task.