Basic Query Examples
All examples below use real data files hosted in the SQLStream repository. You can copy, paste, and run them immediately!
Selecting Data
Data: employees.csv
CLI Example
sqlstream query "SELECT name, salary FROM 'https://github.com/subhayu99/sqlstream/raw/main/examples/employees.csv' WHERE salary > 100000"
Python Example
from sqlstream import query
url = "https://github.com/subhayu99/sqlstream/raw/main/examples/employees.csv"
# Select employees hired after 2020
results = query().sql(f"""
SELECT name, hire_date
FROM '{url}'
WHERE hire_date >= '2020-01-01'
""")