Hi,
Due to the logical order of the SQL queries execution, the "RANK" function cannot be used directly in the "WHERE" clause.
As the "RANK" function can be delegated to the source, I would create a new base view using "Create from query" option with a SQL query by doing the following steps:
* Open the desired data source and click on the "Create base view" option at the top.
* Select the 'Create from query’ option.
* Enter the view name and the SQL query as follows
* select <column_name>, rank_column from (select <column_name>,RANK() OVER (PARTITION BY <column_name> ORDER BY <column_name>) rank_column from <table_name>) where rank_column =<value>.
* Click on 'Save' to create a base view.
From this base view, I would filter the "RANK" function without creating a selection view on top of this view.
For more information, you can have a look at section [Creating Base Views from SQL Queries](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/importing_data_sources_and_creating_base_views/jdbc_sources#creating-base-views-from-sql-queries) of Virtual DataPort Administration Guide.
Hope this helps!