countinrange

0     0     Edited Sep 1, 2015
Usage:
[number] y countinrange( [vector]x, [scalar]minvalue, [scalar]maxvalue )

Returns the count of elements in [vector]x such that minvalue <= xi <= maxvalue. If minvalue or maxvalue are null, the range will have an unbounded min or max, respectively.

NOTE: [PERFORMS TABLE SCAN]

Examples:
countinrange(age, 20, 29)
countinrange(age, 59, null)
countinrange(scalevar, 8, 10)

See Also:
countin, pctin, pctinrange

Leave a Comment

Please sign in to leave a comment.