Percent of Total
"What share of the payroll does each person take?" You need each row's value and the grand total at the same time. A window with an empty OVER () puts the total on every row.
Add PARTITION BY to get a share within each group:
Why 100.0 and not 100? Salaries are whole numbers, and dividing whole numbers drops the decimals, so Alice's 5.7% would come out as 5. Writing 100.0 makes the math keep its decimals.
Check your understanding
Which expression gives each employee's percent of their department's total salary?
Examples run on the employees sample database. Open any of them in the playground to experiment.