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
220
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
53
Other Decks in Programming
See All in Programming
複数アプリケーションを育てていくための共通化戦略
irof
2
620
イベントソーシングとAIの親和性ー物語とLLMに理解できるデータ
tomohisa
1
160
マテリアルって何者?RealityKitで扱うマテリアル入門
nao_randd
0
140
衛星の軌道をWeb地図上に表示する
sankichi92
0
250
Rethinking Data Access: The New httpResource in Angular
manfredsteyer
PRO
0
220
Cursor Meetup Tokyo ゲノミクスとCursor: 進化と制約のあいだ
koido
1
290
バランスを見極めよう!実装の意味を明示するための型定義 TSKaigi 2025 Day2 (5/24)
whatasoda
2
780
抽象データ型について学んだ
ryounasso
0
210
#QiitaBash TDDでAIに設計イメージを伝える
ryosukedtomita
2
1.6k
TVer iOSチームの共通認識の作り方 - Findy Job LT iOSアプリ開発の裏側 開発組織が向き合う課題とこれから
techtver
PRO
0
710
Cloudflare Realtime と Workers でつくるサーバーレス WebRTC
nekoya3
0
240
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
100
Featured
See All Featured
Embracing the Ebb and Flow
colly
85
4.7k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Building an army of robots
kneath
306
45k
Typedesign – Prime Four
hannesfritz
41
2.6k
The World Runs on Bad Software
bkeepers
PRO
68
11k
Unsuck your backbone
ammeep
671
58k
Balancing Empowerment & Direction
lara
1
87
What's in a price? How to price your products and services
michaelherold
245
12k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
For a Future-Friendly Web
brad_frost
178
9.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
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