google / weather-tools

Tools to make weather data accessible and useful.
https://weather-tools.readthedocs.io/
Apache License 2.0
212 stars 40 forks source link

Apply Multiple Aggregate function in a single query. #431

Closed dabhicusp closed 8 months ago

dabhicusp commented 8 months ago

Added Support for the variable name with Quote in SELECT Clause and Multiple Aggregate functions in a single query. Queries such as the following are now supported:

SELECT 
    SUM(charnock) , AVG(temperature), AVG(charnock) 
FROM 
    'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3' 
WHERE 
    time >= '2022-03-01' AND time < '2022-03-02' AND latitude < -66.5
SELECT 
    '100m_v_component_of_wind'  
FROM 
    'gs://gcp-public-data-arco-era5/ar/full_37-1h-0p25deg-chunk-1.zarr-v3' 
WHERE 
    time >= '2022-03-01' AND time < '2022-03-02' AND latitude < -66.5