The Partition by keyword in Oracle SQL is used with window functions to divide the result set into partitions (or groups of rows).
This allows you to perform calculations such as cumulative sums, rankings, and averages within each partition, without affecting other rows.
It’s commonly used with functions like ROW NUMBER, RANK, SUM, and AVG. By partitioning the data, you can apply these functions to subsets of data, rather than the entire result set.
This is the purpose of the Partition By keyword in Oracle SQL.