How come I cannot calculate the running sum on the column I am ordering by?

For example, I have this Candidates table:

    Candidates table:
+-------------+------------+--------+
| employee_id | experience | salary |
+-------------+------------+--------+
| 1           | Junior     | 10000  |
| 9           | Junior     | 10000  |
| 2           | Senior     | 20000  |
| 11          | Senior     | 20000  |
| 13          | Senior     | 50000  |
| 4           | Junior     | 40000  |
+-------------+------------+--------+

I just want to calculate the running sum on the salary for Seniors. This might be a brain fart on my part, but why won’t this query work the way I expect it to:

select *
      , count(employee_id) over (order by salary)
      , sum(salary) over (order by salary)
from Candidates
where experience = 'Senior'

versus

select *
      , count(employee_id) over (order by salary, employee_id)
      , sum(salary) over (order by salary, employee_id)
from Candidates
where experience = 'Senior'

Why do I need to include the extra employee_id in my order by clause?

Related Posts

Casino Odds Explained: How Payouts Really Work 

Casino Odds Explained: How Payouts Really Work 

Many people enjoy playing at a Casino for entertainment. Some hope for big wins, while others simply like the excitement
Master RTP and Volatility to Improve Every Slot Session You Play

Master RTP and Volatility to Improve Every Slot Session You Play

Every player should understand two critical numbers before spinning any slot online game. The return to player (RTP) percentage and
How to Choose Safe Slot Sites with Instant Payments and Transparent Systems

How to Choose Safe Slot Sites with Instant Payments and Transparent Systems

Online gaming has grown fast in recent years, and with that growth comes more choice than ever. While this sounds
Exploring the Appeal of lab grown diamonds Auckland and the Rise of man made diamonds in Modern Jewelry

Exploring the Appeal of lab grown diamonds Auckland and the Rise of man made diamonds in Modern Jewelry

Because the demand for moral and sustainable rings maintains to develop, two trends have captured the eye of each purchasers