29. Stipendiyasi bor va yo'q talabalar
Osonstudents va scholarships jadvallari bor. Har bir talaba uchun stipendiya
summasini qaytaring — stipendiyasi yo'q talabalar ham ro'yxatda qolsin,
ularda summa NULL bo'ladi.
Ustunlar: student, amount. Saralash: student alifbo.
students: id INT PK, name VARCHAR
scholarships: id INT PK, student_id INT, amount INT
Jadval: students
| Ustun | Turi |
|---|---|
| id | INT PK |
| name | VARCHAR(60) |
Jadval: scholarships
| Ustun | Turi |
|---|---|
| id | INT PK |
| student_id | INT |
| amount | INT |
Namuna ma'lumotlar
sample-basic
students
| idINT | nameVARCHAR(60) |
|---|---|
| 1 | Aziz |
| 2 | Bek |
| 3 | Dilnoza |
scholarships
| idINT | student_idINT | amountINT |
|---|---|---|
| 1 | 1 | 500000 |
| 2 | 3 | 300000 |
Kutilgan natija
| amount | student |
|---|---|
| 500000 | Aziz |
| NULL | Bek |
| 300000 | Dilnoza |
sample-none-have
students
| idINT | nameVARCHAR(60) |
|---|---|
| 1 | Solo |
| 2 | Duo |
Kutilgan natija
| amount | student |
|---|---|
| NULL | Duo |
| NULL | Solo |
sample-all-have
students
| idINT | nameVARCHAR(60) |
|---|---|
| 1 | Kamola |
| 2 | Malika |
scholarships
| idINT | student_idINT | amountINT |
|---|---|---|
| 1 | 1 | 100000 |
| 2 | 2 | 200000 |
Kutilgan natija
| amount | student |
|---|---|
| 100000 | Kamola |
| 200000 | Malika |
O'xshash masalalar
Konsol
Natijani ko'rish uchun so'rovni ishga tushiring.
