By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
EMPLOYEE | ELEMENT | VALUE | DEPT |
---|---|---|---|
001 | Basic | 100 | Sales |
001 | Rent | 300 | Sales |
002 | Basic | 200 | Procurement |
002 | Basic | 100 | Procurement |
003 | Pension | 400 | Procurement |
EMPLOYEE | DEPT | BASIC | RENT | PENSION |
---|---|---|---|---|
001 | Sales | 100 | 300 | 0 |
002 | Procurement | 300 | 0 | 0 |
003 | Procurement | 0 | 0 | 400 |