# PQL - Pipelined Query Language

> Clean Markdown view of GeekNews topic #13636. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=13636](https://news.hada.io/topic?id=13636)
- GeekNews Markdown: [https://news.hada.io/topic/13636.md](https://news.hada.io/topic/13636.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2024-03-04T10:16:01+09:00
- Updated: 2024-03-04T10:16:01+09:00
- Original source: [github.com/runreveal](https://github.com/runreveal/pql)
- Points: 17
- Comments: 0

## Topic Body

- Microsoft의 Kusto 에서 영감을 받은 쿼리 언어. SQL로 컴파일됨   
- Go 로 작성된 라이브러리 이며, Clickhouse SQL dialect 로 테스트 되었으나 생성된 SQL 은 DB에 구애받지 않음   
- 각 쿼리 결과를 다음 쿼리로 파이프하여 복잡한 쿼리를 간단히 만들수 있게 설계됨   
### 작성 예제   
```SQL  
StormEvents  
| where DamageProperty > 5000 and EventType == "Thunderstorm Wind"  
| top 3 by DamageProperty  
```  
이 문장은 다음과 같은 SQL로 컴파일됨   
```SQL   
SELECT *  
FROM StormEvents  
WHERE DamageProperty > 5000 AND EventType = 'Thunderstorm Wind'  
ORDER BY DamageProperty DESC  
LIMIT 3;  
```

## Comments



_No public comments on this page._
