You can translate the question and the replies:

dense rank

get the 5TH highest annualincome
17-04-2023 02:14:22 -0400

1 Answer

Hi, As per my understanding, you want to extract the 5th highest annual income from your Denodo views using VQL query. Just like in SQL, VQL supports common analytic functions like **DENSE_RANK**, **RANK** and **ROW_NUMBER** to help calculate ranking criterias. You can write your queries just like in SQL as per below example: ``` SELECT store_location, ranking, sales_amount FROM ( SELECT store_location, RANK() OVER(ORDER BY SUM(amount) DESC) ranking, SUM(amount) sales_amount FROM sales WHERE year = ‘2022’ group by store_location ) WHERE ranking = 5 ``` I recommend checking out this [documentation]( for more details about the different analytic functions available in VQL. Hope this helps!
Denodo Team
17-04-2023 19:31:44 -0400
You must sign in to add an answer. If you do not have an account, you can register here