Mamajonov akmaljon



Yüklə 84,75 Kb.
səhifə3/4
tarix25.12.2023
ölçüsü84,75 Kb.
#193769
1   2   3   4
Akmaljon MB

FROM employees
WHERE phone_number LIKE '%8';

  • employees jadvalidagi xodimlar sonini job_id maydoni bo’yicha guruhlab chop etuvchi so’rov yarating.




SELECT job_id, COUNT(*) AS employee_count
FROM employees
GROUP BY job_id;



  • Bir nechta xodim ishlovchi(bittadan ko’p) department_id ustuni ma’lumotlarini chop eting.




SELECT department_id, COUNT(*) AS employee_count
FROM employees
GROUP BY department_id
HAVING COUNT(*) > 1;



  • salary ustunidagi ma’lumotlarni oylik maosh deb oladigan bo’lsak yillik maoshi 100000 yuqori bo’lgan xodimlar ism, familiyasi, maoshini chop etuvchi so’rov yarating.




SELECT first_name, last_name, salary, salary * 12 AS yearly_salary
FROM employees
WHERE salary * 12 > 100000;

  • Ismi yoki familiyasida ketma-ket “LL” harflari mavjud xodimlar ma’lumotlarini chop etuvchi so’rov yarating.




SELECT *
FROM employees
WHERE first_name LIKE '%LL%' OR last_name LIKE '%LL%';


  • 1997 yili ishga qabul qilingan xodimlarni maoshlarini kamayish tartibida chiqaruvchi so’rov yarating.




SELECT first_name, last_name, salary
FROM employees
WHERE YEAR(hire_date) = 1997
ORDER BY salary ASC;

  • IN operatoridan foydalanib Familiyalari(last_name) 'Fay', 'Baida', 'Baer' bo’lgan xodimlar ismi hamda telefon raqamini chop etuvchi so’rov yarating.



Yüklə 84,75 Kb.

Dostları ilə paylaş:
1   2   3   4




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin