Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Love at first query
Search
DouEnergy
August 02, 2023
Programming
1
210
Love at first query
exploring SQL with DuckDB
DouEnergy
August 02, 2023
Tweet
Share
More Decks by DouEnergy
See All by DouEnergy
The Last Gedi
douenergy
0
47
Other Decks in Programming
See All in Programming
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
150
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
490
CI改善もDatadogとともに
taumu
0
200
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
770
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
1
210
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
240
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
ML.NETで始める機械学習
ymd65536
0
230
Domain-Driven Transformation
hschwentner
2
1.9k
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
230
Honoとフロントエンドの 型安全性について
yodaka
7
1.4k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
10
1.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Speed Design
sergeychernyshev
27
810
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
For a Future-Friendly Web
brad_frost
176
9.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
370
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Transcript
None
None
None
None
DouEnergy
None
SQLite for analytics
None
None
We all love Postgres
S3, malloc for the Internet
Building and operating a pretty big storage system called S3
We all love AWS S3
None
How many of you can set up a Postgres on
your laptop to analyze a CSV(JSON, Parquet) on AWS S3?
And...
In less 3 minutes
Or
DuckDB-wasm
just 3 seconds
SELECT * FROM 'https://r2duck2.douenergy.com/central-park-w eather.csv';
Demo 1
CREATE TABLE R2Weather AS FROM 'https://r2duck2.douenergy.com/central-park- weather.csv';
Annual average of maximum temperature ? (每一年的單日最高溫平均)
SELECT EXTRACT(YEAR FROM DATE) AS year, AVG(TMAX) as average_max_temp FROM
R2weather GROUP BY year ORDER BY year;
Rolling average of the maximum temperature over the last 7
days for each date?(過去七日的最高溫平均)
SELECT DATE, TMAX, AVG(TMAX) OVER sevenday AS rolling_7_day_avg FROM R2weather
WINDOW sevenday AS(ORDER BY DATE ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) LIMIT 20;
Average maximum temperature? precipitation(降雨量) 0.1 < precipitation < 0.2 0.4
< precipitation
SELECT COUNT(*) FILTER (WHERE PRCP BETWEEN 0.1 AND 0.2) low_days,
AVG(TMAX) FILTER (WHERE PRCP BETWEEN 0.1 AND 0.2) low_prcp_temp, COUNT(*) FILTER (WHERE 0.4 < PRCP) high_days, AVG(TMAX) FILTER (WHERE 0.4 < PRCP) high_prcp_temp FROM R2Weather;
None
None
None
None
None
None
None
None
None
None
None
None
None
Apache Arrow
Benchmark
Demo 2
葛來分多 加10分
葛來分多 再加10分
None
Two month ago 🔥
Duck Arts Defence 🦆🪄
Duck Arts Defence 🦆🪄
None
None
You may say I'm a SQLer But I'm not the
only one. I hope someday you'll join us.
Thanks