I would like to get random values within a group-by query, something like this:
SELECT city
, SOME_RANDOMIZER_FUNC(latitude) as "RANDOM_LATITUDE_IN_CITY"
, SOME_RANDOMIZER_FUNC(longitude) AS "RANDOM_LONGITUDE_IN_CITY"
FROM some_table
GROUP BY city
Where the function SOME_RANDOMIZER_FUNC
returns a random value within the group.
Aucun commentaire:
Enregistrer un commentaire