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
170
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
43
Other Decks in Programming
See All in Programming
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
130
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
ペアーズにおけるAmazon Bedrockを⽤いた障害対応⽀援 ⽣成AIツールの導⼊事例 @ 20241115配信AWSウェビナー登壇
fukubaka0825
6
2k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
700
シェーダーで魅せるMapLibreの動的ラスタータイル
satoshi7190
1
480
Jakarta EE meets AI
ivargrimstad
0
640
最新TCAキャッチアップ
0si43
0
200
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
1k
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1.2k
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
430
Ruby is Unlike a Banana
tanoku
97
11k
Documentation Writing (for coders)
carmenintech
65
4.4k
Done Done
chrislema
181
16k
Building an army of robots
kneath
302
43k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
How to train your dragon (web standard)
notwaldorf
88
5.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
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