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