Finding change maximum change in the value using Redshift

Following is the problem I want to solve. But I don't know how to implement it. I am using Redshift to store data.

Following is the format of the data stored in Redshift. It is sales history for every product for all year by month.

ProductId   Year    Month   Sales
A           2018    1       ...
A           2018    2       ...
A           2018    3       ...
A           2018    4       ...
A           2018    5       ...
B           2018    1       ...
B           2018    2       ...
B           2018    3       ...
B           2018    4       ...
B           2018    5       ...
....
....
....

Let's assume following are the sales chart of Product A, B and C. Each line represent sales in different year. I have a query: "Sales of which product increases in the month of October". The answer should be Product A followed by B. (Product A has fewer sales then Product B but percent change in sales value of Product A is higher)

How can I extract such a pattern from the data?

Topic data-analysis redshift

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.