Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Love at first query
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
DouEnergy
August 02, 2023
Programming
240
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Love at first query
exploring SQL with DuckDB
DouEnergy
August 02, 2023
Transcript
55 slides
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
More Decks by DouEnergy
See All by DouEnergy
The Last Gedi
douenergy
0
120
Other Decks in Programming
See All in Programming
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
150
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
290
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
910
コード生成時代のAPI定義を支えるRequest Spec移行
pvcresin
0
200
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
650
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
170
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
240
protojson における文字化けの扱い
kazuki1023
0
440
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
420
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
520
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Typedesign – Prime Four
hannesfritz
42
3.2k
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
Crafting Experiences
bethany
1
440
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
4 Signs Your Business is Dying
shpigford
187
23k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.7k
Docker and Python
trallard
47
4.3k
Navigating Team Friction
lara
192
16k
The Cost Of JavaScript in 2023
addyosmani
56
10k
Speed Design
sergeychernyshev
33
2.2k