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
200
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
46
Other Decks in Programming
See All in Programming
Spatial Rendering for Apple Vision Pro
warrenm
0
290
fs2-io を試してたらバグを見つけて直した話
chencmd
0
270
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
170
Effective Signals in Angular 19+: Rules and Helpers
manfredsteyer
PRO
0
210
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
2
510
php-conference-japan-2024
tasuku43
0
380
Compose UIテストを使った統合テスト
hiroaki404
0
110
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
1.2k
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
1.1k
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
500
htmxって知っていますか?次世代のHTML
hiro_ghap1
0
370
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
310
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
182
21k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
BBQ
matthewcrist
85
9.4k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
KATA
mclloyd
29
14k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
A Philosophy of Restraint
colly
203
16k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
It's Worth the Effort
3n
183
28k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
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