|
Talabalar nechta shahardan kelganligini aniqlovchi so’rov to’g‘ri keltirilgan qatorni toping
|
bet | 23/27 | Sana | 23.12.2023 | Hajmi | 149,35 Kb. | | #127449 |
Bog'liq Test savollari197. Talabalar nechta shahardan kelganligini aniqlovchi so’rov to’g‘ri keltirilgan qatorni toping
Select count(*) from Talaba;
Select count(distinct tug_shahar) from Talaba;
Select SUM(distinct tug_shahar) from Talaba;
Select SUM(*) FROM Talaba;
198. TALABA1 va TALABA2 jadvallari qanday kortejlar bilan kesishganini topish uchun qanday so’ruv yoziladi
Select *from talaba1 MINUS Select *from talaba2
SELECT ism FROM TALABA1 INTERSECT SELECT ism FROM TALABA2
Select *from talaba1 Union Select *from talaba2
Select *from talaba1 intersect select *from talaba2;
199. T1 jadval ID, ism,familiya, tugilgan sanasi, yoshi atributlariga ega. Savol: familiya bo’yicha guruxlash amalga oshirilib bir xil familiya ostida bo’lgan talabalarning yoshi yig‘indisi 25 dan katta bo’lganlarining familiyasi kamayish tartibida yozilsin
Select familiya, SUM(yoshi) from T1 group by familiya having SUM(yoshi)>25 order by familiya desc;
Select familiya, COUNT(yoshi) from T1 group by familiya having COUNT(yoshi)>25 order by familiya desc;
Select familiya, MAX(yoshi) from T1 group by familiya having SUM(yoshi)>25 order by familiya DESC;
Select familiya, SUM(yoshi) from T1 group by familiya having SUM(yoshi)>25 order by familiya ;
200. SQL operatorlari necha guruxga bo’linadi?
3
2
4
5
“Ma’lumotlar bazasini boshqarish tizimlari” fanidan TEST SAVOLLARI
|
|
№
|
|
|
| |