WHERE TOP or BOTTOM(n) OF

Similar to WHERE TOP or BOTTOM(n) IN, WHERE TOP or BOTTOM OF serves as a filter that limits the values included in the metric’s computations. Using the OF keyword (rather than IN) allows ranking of more than one metric and interprets the ranking metric as a sub-metric. This filter supports percent parameters: n%.

Syntax

SELECT … WHERE TOP(…) OF … [WITHIN …]
SELECT  metric1  WHERE [TOP|BOTTOM](n) OF ( metric2 , ...)
SELECT  metric1  WHERE [TOP|BOTTOM](n) OF ( metric2 , ...) WITHIN ( ... )

Examples

SELECT  Amount  WHERE TOP(5%) OF ( Amount ) AND  Product = Explorer 

This may also help: