|
Sorov: select id,soni from mahallalar_m where id between 1 and 4
|
bet | 5/5 | Sana | 05.01.2024 | Hajmi | 1,43 Mb. | | #130389 |
Bog'liq 1M bSorov: select id,soni from mahallalar_m where id between 1 and 4;
Natija:
3. . Mahallalar_m jadavalidan [1;4] intervaldagi malumotlarni chiqaramiz;
Sorov: select*from mahallalar_m where id between 1 and 4;
Natija:
4. Mahallalar_m jadvalida like ishlatamiz;
Sorov: select*from mahallalar_m where nomi lik ‘G%’;
Natija:
Sorov: : select*from mahallalar_m where nomi lik ‘N%’;
Natija;
5.Mahallalar jadvalidan nomi satriga upper funksiyasi kiritamiz
Sorov: select id, nomi, upper(nomi) from mahalllalar_m;
Natija:
Mahallalar jadvalidan nomi satriga lower funksiyasi kiritamiz
Sorov: select id, nomi,lower(nomi) funksiyasini kiritamiz
Natija:
Length funksiyasi va mantiq ammalarini qollanilishi
Sorov; select id,nomi,length(nomi) from mahallalar_m;
Natija:
Length funksiyasi yordamida id=4 teng bolmagan barcha id larni chiqarsin
Sorov: select id,nomi, length(nomi) from mahallar_m where not id=4
Natija:
Order by funksiya orqali mahallalar jadvali alifbo tartibida bo’sin;
Sorov: select*from mahallar_m order by nomi;
Natija:
Mahallar nomli tabeldan soni max va min bolgan malumotni chiqarin
Sorov: select max(soni) from mahallalar_m;
Natija:
Sorov: select max(soni) from mahallalar_m;
Natija:
Sum funksiyasi orqali sonini hisoblimiz
Sorov: select sum(soni) frommahallalar_m;
Natija:
Avg funksiya orqali o’rta arifmetigini hisoblimiz;
Sorov: select avg(soni) from mahallalar_m;
Natija:
|
| |