I have a table with different values in BigQuery and I want to select the min or the max of these values.
Advertisement
Answer
You can use min/max with group by to get min or max date per ID group
SELECT ID, MIN(DATE) AS MIN_DATE, MAX(DATE) AS MAX_DATE FROM TABLE GROUP BY ID