By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
6 rows affected
code | model | color | type | price |
---|---|---|---|---|
1 | 1276 | n | Laser | 400.0000 |
2 | 1433 | y | Jet | 270.0000 |
3 | 1434 | y | Jet | 290.0000 |
4 | 1401 | n | Matrix | 150.0000 |
5 | 1408 | n | Matrix | 270.0000 |
6 | 1288 | n | Laser | 400.0000 |
code | model | color | type | price | group | avg_price |
---|---|---|---|---|---|---|
1 | 1276 | n | Laser | 400.0000 | 1 | 400.0000 |
2 | 1433 | y | Jet | 270.0000 | 1 | 270.0000 |
3 | 1434 | y | Jet | 290.0000 | 2 | 280.0000 |
4 | 1401 | n | Matrix | 150.0000 | 2 | 275.0000 |
5 | 1408 | n | Matrix | 270.0000 | 3 | 273.3333 |
6 | 1288 | n | Laser | 400.0000 | 4 | 305.0000 |