56. Oylik o'sish foizi
O'rtachaWindow funksiyalarClick
Har bir oy uchun oldingi oyga nisbatan o'sish foizini hisoblang.
Ustunlar: month, revenue, growth_pct.
growth_pct=(revenue - oldingi) / oldingi * 100, 2 xona aniqlikda- Birinchi oyda
growth_pct—NULL
Saralash: month o'sish.
Jadval: monthly_revenue
| Ustun | Turi |
|---|---|
| month | DATE PK |
| revenue | NUMERIC(14,2) |
Namuna ma'lumotlar
sample-basic
monthly_revenue
| monthDATE | revenueNUMERIC(14,2) |
|---|---|
| 2025-01-01 | 100000000 |
| 2025-02-01 | 125000000 |
| 2025-03-01 | 100000000 |
Kutilgan natija
| month | revenue | growth_pct |
|---|---|---|
| 2025-01-01 | 100000000 | NULL |
| 2025-02-01 | 125000000 | 25 |
| 2025-03-01 | 100000000 | -20 |
sample-single
monthly_revenue
| monthDATE | revenueNUMERIC(14,2) |
|---|---|
| 2025-06-01 | 50000000 |
Kutilgan natija
| month | revenue | growth_pct |
|---|---|---|
| 2025-06-01 | 50000000 | NULL |
sample-double
monthly_revenue
| monthDATE | revenueNUMERIC(14,2) |
|---|---|
| 2025-01-01 | 10000000 |
| 2025-02-01 | 20000000 |
Kutilgan natija
| month | revenue | growth_pct |
|---|---|---|
| 2025-01-01 | 10000000 | NULL |
| 2025-02-01 | 20000000 | 100 |
O'xshash masalalar
Konsol
Natijani ko'rish uchun so'rovni ishga tushiring.
