Gurux talabasi Qambaraliyev Ahliddin 2-deadline


Download 73.76 Kb.
bet3/6
Sana02.06.2024
Hajmi73.76 Kb.
#1835492
1   2   3   4   5   6
Bog'liq
Ahliddin baza

Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha Order by, Group by operatorlaridan foydalanib so’rovlar yaratishi va natijasi bilan ko’rsatib o’tishi kerak.

mysql> select* from kemalar order by kema_nomi;


+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| 1 | Arslon | Yuk tashuvchi | 2020-12-12 | 12:12:20 | 25 | yelkan | Tajribali | Kasbiy |
| 3 | Bear | Kuryer | 2022-03-03 | 10:10:10 | 30 | Qayiqlar | Mutaxasis | Shimoliy |
| 2 | Lochin | Kater | 2021-02-02 | 11:10:30 | 20 | Qutqaruv qayigi | Mutaxasis | Lablador |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
3 rows in set (0.10 sec)

mysql> select* from kemalar group by kema_nomi;


+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| 1 | Arslon | Yuk tashuvchi | 2020-12-12 | 12:12:20 | 25 | yelkan | Tajribali | Kasbiy |
| 2 | Lochin | Kater | 2021-02-02 | 11:10:30 | 20 | Qutqaruv qayigi | Mutaxasis | Lablador |
| 3 | Bear | Kuryer | 2022-03-03 | 10:10:10 | 30 | Qayiqlar | Mutaxasis | Shimoliy |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
3 rows in set (0.00 sec)

mysql> select count(*) ,k_i_raqami,kema_turi from kemalar group by o_soni;


+----------+------------+---------------+
| count(*) | k_i_raqami | kema_turi |
+----------+------------+---------------+
| 1 | 1 | Yuk tashuvchi |
| 1 | 2 | Kater |
| 1 | 3 | Kuryer |
+----------+------------+---------------+
3 rows in set (0.00 sec)

mysql>



  1. Download 73.76 Kb.

    Do'stlaringiz bilan baham:
1   2   3   4   5   6




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling