• So‘rov: Select count(*) as ‘mahsulotlar_soni’ from mahsulotlar; Natija: 3.6-rasm.
  • So`rov: Select * from ishchilar where lavozimi=‘direktor’; Natija: 3.8– rasm.
  • So`rov: Select mid(FISH0, 1, 1) as ‘bosh harflar’, FISH from ishchilar; Natija: 3.10x – rasm.
  • So‘rov: Select max(ID) as ‘eng kam oylik oladigan ’ from ishchilar




    Download 3,59 Mb.
    bet5/6
    Sana13.05.2024
    Hajmi3,59 Mb.
    #228155
    1   2   3   4   5   6
    Bog'liq
    malumot.qayta1-6

    So‘rov: Select max(ID) as ‘eng kam oylik oladigan ’ from ishchilar;
    Natija:


    3.4.–rasm. MAX() funksiyasining qo‘llanishi.
    ishchilar id si 2 va 4 oralig‘ida bo‘lgan qurilma ma’lumotlarini chiqaramiz.
    So‘rov: Select *from ishchilar where ID between 2 and 4;
    Natija:

    3.5-rasm. BETWEEN operatorining qo‘llanishi.
    5.ishchilar jadvalidagi qurilmalar sonini aniqlaymiz:
    So‘rov: Select count(*) as ‘mahsulotlar_soni’ from mahsulotlar;
    Natija:

    3.6-rasm. COUNT() funksiyasining qo‘llanishi.

    6.ishchilar jadvalidagi qurilmalar id larining o‘rta arifmetigini aniqlaymiz.


    So‘rov: Select avg(ID) as ‘ishchilar ID lari orta arifmetigi’ from ishchilar;
    Natija:


    3.7– rasm. AVG()funksiyasining qo‘llanishi.
    7.ishchilar haqida ma‘lumotlarni chiqaramiz;
    So`rov: Select * from ishchilar where lavozimi=‘direktor’;
    Natija:


    3.8– rasm. SELECT va WHEREning qo‘llanishi.
    8. ishchilar jadvalida barcha qurilmalar id lari yig‘indisini topamiz;
    So`rov: Select sum(id) as ‘ishchilar ID lari yig’indisi’ from ishchilar;
    Natija:

    3.9– rasm. SUM() funksiyasining qo‘llanishi.

    1. ishchilar jadvalidagi qurilma nomlarini bosh harflarini va qurilma nomini chiqaramiz;

    So`rov: Select mid(FISH0, 1, 1) as ‘bosh harflar’, FISH from ishchilar;
    Natija:

    3.10x – rasm. MID() funksiyasining qo‘llanishi.


    6-Amaliy ish .
    Group by va Order by standart so‘zlaridan foydalanib so’rov yaratish. HAVING standart so’zi orqali so’rovlar yaratish.

    Ishni bajarish tartibi



    1. maktab ishchilari oylik narxlari topilsin.


    Download 3,59 Mb.
    1   2   3   4   5   6




    Download 3,59 Mb.

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    So‘rov: Select max(ID) as ‘eng kam oylik oladigan ’ from ishchilar

    Download 3,59 Mb.