ClickHouse奇技淫巧系列之SQL查文件


history | awk '{print $1"\t"$2}' | clickhouse-client \ --query="SELECT shell, count() AS c FROM history \ GROUP BY shell ORDER BY c DESC limit 10 " \ --external --file=- --name=history \ --structure='id UInt16, shell String' -h 127.0.0.1 ls 390 cd 243 clickhouse-client 173 du 67 vim 57 htop 42 cat 28 history 27 tailf 25 mysql 24



參考資料
https://www.cnblogs.com/zqr99/p/9939418.html
https://www.jianshu.com/p/2e49edbeb1ef
https://www.jianshu.com/p/8875dede8db7?clicktime=1578014751


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM