By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| id | dep | cash | advance | ratio |
|---|---|---|---|---|
| 1 | 100 | 100 | 200 | 2.0000 |
| 2 | 200 | 300 | 500 | 2.5000 |
| id | dep | cash | advance | ratio |
|---|---|---|---|---|
| 1 | 200 | 100 | 200 | 1.0000 |
| 2 | 200 | 300 | 500 | 2.5000 |
| id | dep | cash | advance | ratio |
|---|---|---|---|---|
| 1 | 100 | 100 | 200 | 2.0000 |
| 2 | 200 | 300 | 500 | 2.5000 |
| id | dep | cash | advance | ratio |
|---|---|---|---|---|
| 1 | 200 | 100 | 200 | 1.0000 |
| 2 | 200 | 300 | 500 | 2.5000 |