TOP N Queries on metric after filtering

Hi,

I was going through the druid docs on TopN queries: http://druid.io/docs/0.12.1/querying/topnquery.html

I want to find out TOP N values of a dimension based on some metric but that metric isn’t ingested into druid.

It will be calculated by applying some filter condition. Is it possible to find out TOP N values based on such a metric ?

Example (from the druid doc): Find out TOP N countries by clicks(which is a metric in druid) where advertiser is google.com and gender is MALE

Thanks

yes you can use the filters to do that. you can find the filters here: http://druid.io/docs/0.12.1/querying/filters.html