Raven 1.6: Naloge SQL
Podana je tabela:
| id | user_id | product_id | amount | date |
|---|---|---|---|---|
| 1 | 2 | 2 | 150.50 | 2020-03-17 |
| 2 | 3 | 2 | 200.60 | 2017-08-31 |
| 3 | 4 | 4 | 700.10 | 2011-05-03 |
| 4 | 5 | 3 | 300.40 | 2005-12-31 |
| 5 | 5 | 3 | 650.70 | 2000-12-02 |
Rešite zanjo naslednje naloge:
Poiščite minimalno vrednost stolpca amount iz te tabele.
Poiščite maksimalno vrednost stolpca amount iz te tabele.
Poiščite povprečno vrednost stolpca amount iz te tabele.
Poiščite povprečno vrednost stolpca amount iz te tabele in to vrednost zaokrožite.
Poiščite vsoto stolpca amount iz te tabele in to vrednost zaokrožite na eno decimalno mesto.
Poiščite povprečno vrednost stolpca amount iz te tabele in to vrednost zaokrožite navzgor.
Poiščite povprečno vrednost stolpca amount iz te tabele in to vrednost zaokrožite navzdol.
Poiščite vsoto stolpca amount iz te tabele in poskrbite, da bo ostalo 4 decimalnih mest.