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
Amazon Qを使ってIaCを触ろう!
maruto
0
410
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
RubyLSPのマルチバイト文字対応
notfounds
0
120
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
Better Code Design in PHP
afilina
PRO
0
130
Jakarta EE meets AI
ivargrimstad
0
170
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
100
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Designing the Hi-DPI Web
ddemaree
280
34k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Building Applications with DynamoDB
mza
90
6.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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