Muhammad al-xorazmiy nomidagi toshkent axborot texnologiyalari universiteti radio va mobil aloqa fakulteti


Download 199.79 Kb.
bet5/6
Sana21.11.2023
Hajmi199.79 Kb.
#1791369
1   2   3   4   5   6
Bog'liq
Samandar.baza,mustaqil ish

Group by – GURUHLASH;
Order by – TARTIBLASH;
Order by(asc)- O’SISH TARTIBI;
Order by desc- KAMAYISH TARTIBI;
HAWING==WHERE;
Endi shu operatirlar yordamida ishlar amalga oshiramiz…
So’rovlar va natijalar:
select * from kafedra order by staji;// order by dan foydalandik

select * from kafedra order by Staji desc;// order by desc dan foydalandik kamayish tartibida

select Maoshi from kafedra group by Maoshi;// group by dan foydalandik


select id,FISH,sum(Staji) from kafedra group by id,FISH;// summasi groupbyda


select id,FISH,Manzili,sum(Staji) from kafedra group by id,FISH,Manzili;


select id,FISH,Lavozimi,Maoshi from kafedra having Maoshi>5000 order by Lavozimi;//Having dan foydalandik…

select id, max(Maoshi) from kafedra group by id;// max dan group by dan qo’llanishi…

11-rasmlar: kafedra Group by va Order by standart so’zlaridan qo’llanildi..
birlashtirish(UNION);
-kеsishuv(INTERSECT);
- ayirma(MINUS);

select * from kafedra union select * from kafedra2;// union yordamida birlashtirdik
select * from kafedra union all select * from kafedra2;//union all yordamida birlashtirdik..
INTERSECT ni MySql qo’llab quvatlamaydi Shuning uchun EXISTS yordamida jadvallar kesishmasini topamiz;
select * from kafedra2 where exists(select * from kafedra where kafedra.id=kafedra2.id);// exists qo’llanishi…

SELECT id FROM kafedra WHERE id NOT IN (SELECT id FROM kafedra2);// minus ni o’rniga shuni ishlatdim..


Xulosa:
MEN DARSLAR DAVOMIDA MAL’LUMOTLAR BAZASINI

Download 199.79 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