> ## Documentation Index
> Fetch the complete documentation index at: https://raymondchang.me/llms.txt
> Use this file to discover all available pages before exploring further.

# SQL and time-series storage

> SQL 窗口函數、as-of join 與時序資料的儲存設計。

> [!NOTE]
>
> **Status of this page：** 大綱（skeleton）。內容尚未撰寫，未經來源驗證。

## 大綱

1. 窗口函數：滾動統計、排名與差分
2. As-of join：把 quote 對齊到 trade 的寫法與效能
3. 分區、索引與列式儲存對查詢的影響
4. 時序資料庫與傳統 RDBMS 的取捨
5. 大量 tick 資料的成本與保留策略

## 面試常問

* 寫一個查詢：取每筆成交當時最新的 quote
* 為什麼時序資料表需要依日期分區？

## Related pages

* [Interview：Data engineering](https://raymondchang.me/quantitative-research/interview/data-engineering.md)
* [Python data stack](https://raymondchang.me/quantitative-research/data-infra/python-data-stack.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.