| IPhone 12 pro MAX-AP |
| IPhone 11 pro MAX-AP |
| Galaxy S21 Ultra-SA |
| Honor 7 plus-HO
|
| Redmi Note 9 Pro-XI |
| Huawei P 30 Lite-HU |
| Redmi 10 T-XI
|
| Miui 12 Ultra -XI
|
+----------------------+
rows in set (0.01 sec)
POWER VA SQRT:
mysql> select POW(Maxsulotsoni,2) from products;
+---------------------+
| POW(Maxsulotsoni,2) |
+---------------------+
|
64 |
|
49 |
|
144 |
|
100 |
|
324 |
|
256 |
|
169 |
|
0 |
|
0 |
+---------------------+
9 rows in set (0.01 sec)
mysql> select sqrt(Maxsulotsoni) from products;
+--------------------+
| sqrt(Maxsulotsoni) |
+--------------------+
8.
| 2.82842712474619 |
| 2.64575131106459 |
| 3.46410161513775 |
| 3.16227766016838 |
| 4.24264068711928 |
|
4 |
| 3.60555127546399 |
|
0 |
|
0 |
+--------------------+
9. Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha murakkab
so’rovlar yaratishi va natijasi bilan ko’rsatib o’tishi kerak.
ANY:
mysql> select * from oq_guruxlari where nomi = Any
-> (select nomi from Oq_guruxlari2);
+
+
+
+
+
| NOMI
| T_soni | Q_yili | O_kursi |
+
+
+
+
+
| Axborot xavfsizligi | 40 | 2021 |
2 |
+
+
+
+
+
1 row in set (0.00 sec)
ALL:
select * from oq_guruxlari where nomi != ALL
->
-> (select nomi from Oq_guruxlari2);
10. Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha JOIN
operatorilaridan foydalanib so’rovlar yaratishi va natijasi bilan ko’rsatib
o’tishi kerak.
11. mysql> select * from talaba;
12. +------+------------+----------+--------+
13. | T_Id | name
| Fam
| Guruh |
14. +------+------------+----------+--------+
15. | 1 | Shuhrat | Imomov | 650_21 |
16. | 2 | Nurshodbek | Shokirov | 650_21 |
17. | 3 | Javohir | Turgunov | 650_21 |
18. +------+------------+----------+--------+
19. 3 rows in set (0.00 sec)
20.
21. mysql> SELECT * FROM Fanlar ;
22. +------+-------------+------+
23. | T_Id | nomi
| Baho |
24. +------+-------------+------+
25. | 1 | MB
| 2 |
26. | 2 | DISKRET
| 3 |
27. | 3 | ELEKTRONICA | 5 |
28. +------+-------------+------+
29. 3 rows in set (0.00 sec)
30.
31. mysql> SELECT T.Fam, T.name,F.nomi,F.Baho from Talaba T inner
join Fanlar F on T.T_Id=F.T_Id
32. -> where Baho=5;
33. +----------+---------+-------------+------+
34. | Fam
| name | nomi
| Baho |
35. +----------+---------+-------------+------+
36. | Turgunov | Javohir | ELEKTRONICA | 5 |
37. +----------+---------+-------------+------+
38. 1 row in set (0.00 sec)
Dostları ilə paylaş: |