import marimo

__generated_with = "0.16.2"
app = marimo.App(width="medium", sql_output="native")


@app.cell
def _():
    import marimo as mo
    return (mo,)


@app.cell
def _(mo):
    out = mo.sql(
        f"""
        SELECT random(), location, min(measurement) as min, max(measurement) as max, avg(measurement) as average
        FROM read_parquet('measurements/*')
        group by location
        limit 10
        """,
        output=False
    )
    return (out,)


@app.cell
def _(out):
    print(out)
    return


if __name__ == "__main__":
    app.run()
