I need to find the longest distance across all the event points for each country in gdelt-bq.full:events dataset. For having information about countries make groups there is a join with gdelt-bq:extra.countryinfo. So now I have this table: The difficulty is that there are around 50k events in total, and maximum within a group is 15K (for US) and I need