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
230
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
More Decks by DouEnergy
See All by DouEnergy
The Last Gedi
douenergy
0
98
Other Decks in Programming
See All in Programming
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
生成AI導入の「期待外れ」を乗り越える ー 開発フロー改革が目指す、真の組織変革
starfish719
0
170
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
270
Hatena Engineer Seminar #37「言語モデルの活用に関する研究」
slashnephy
0
530
AIエージェントで 変わるAndroid開発環境
takahirom
2
680
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
型も通る、synthも通る、それでも危ない 〜AIのCDKの権限とコストを機械で検証する〜 / It Passes Type Checks, It Passes Synth Checks, but It’s Still Risky — Automatically Verifying Permissions and Costs in AI’s CDK —
seike460
PRO
1
370
初めてのKubernetes 本番運用でハマった話
oku053
0
130
Foundation Models frameworkで画像分析
ryodeveloper
1
120
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
140
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
8
4.7k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
29
4.3k
Are puppies a ranking factor?
jonoalderson
1
3.7k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Facilitating Awesome Meetings
lara
57
7k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
340
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Designing for humans not robots
tammielis
254
26k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
270
Prompt Engineering for Job Search
mfonobong
0
380
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Navigating Weather and Climate Data
rabernat
0
390
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