Stay organized with collections
Save and categorize content based on your preferences.
window.least_common_number
window.least_common_number( numbers, number_of_least_common_values)
Description
Returns the specified number of least common int or float in the input values. A maximum of 1000 values can be extracted.
Param data types
INT|FLOAT, INT
Return type
ARRAY_FLOATS
Code samples
// This rule sets the outcome $least_common_values to the least common int or float in the input values
// in the 5 minute match window.
events:
$e.user.userid = $userid
match:
$userid over 5m
outcome:
$least_common_values = window.least_common_number($e.target.asset.location.region_latitude, 3) // Returns 35.227087,37.422407 and 32.715738 for given latitudes: 37.422407, 40.712775, 40.712775, 40.712775, 32.715738, 35.227087, 32.715738
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-23 UTC."],[],[]]