duckdb-playground/agg.sql
Waylon S. Walker 1fd8a68383 init
2025-03-15 20:27:48 -05:00

16 lines
398 B
SQL

INSTALL httpfs;
LOAD httpfs;
SET s3_region='us-east-1';
SET s3_url_style='path';
SET s3_endpoint='minio.wayl.one';
SET s3_use_ssl = true; -- Set to false if your endpoint doesn't use SSL
CREATE TABLE bookings AS SELECT * FROM read_csv_auto('s3://duckdb-playground/hotel_bookings.csv', all_varchar=1);
SELECT
reservation_status,
COUNT(*)
FROM
bookings
GROUP BY
reservation_status