• 7. ROUND()
  • 9. SQRT()
  • So`rov: Select *from xabar where id between 2 and 9; N at i j a: 11.14 – rasm. Between()
  • So`rov: Select mid(name ,1,1) as ‘bosh harflar’, name from xabar; Natija: 11.15 – rasm. Mid()
  • Texnologiyalari va




    Download 448,64 Kb.
    bet6/6
    Sana18.05.2024
    Hajmi448,64 Kb.
    #243310
    1   2   3   4   5   6
    Bog'liq
    10-Amaliy mashg\'ulot

    11.7– rasm. Count() agregat funksiyasi orqali qurilmalar sonini aniqlash
    Bu funksiyalarga qo`shimcha ravishda quyidagi funksiyalarni ham ko`rib chiqamiz:


    6.Rand() - tasodifiy son.
    So’rov: Select id, maxsulot_nomi, rand(id) from xodimlar;
    Natija:

    11.8– rasm. Rand() funksiyasidan foydalanish
    7. ROUND() - Butun sonni yaxlitlash funktsiyasi.
    So`rov: Select id, name, round(staji/id, 3) from xodimlar;
    Natija:

    11.9– rasm. Round() funksiyasidan foydalanish
    8. POWER() - Sonning darajasini hisoblash.
    Select id, name, power(staji,id) from xodimlar;
    Natija:

    11.10– rasm. Power() funksiyasidan foydalanish


    9. SQRT() - Sonning kvadrat ildizini topish.
    So`rov:Select id,name, sqrt(staji) from xodimlar;
    Natija:

    11.11– rasm. Sqrt() funksiyasidan foydalanish
    10. SIN() - Ifoda sinusini hisoblash.
    So`rov: Select id,name, sin(staji) from xodimlar;
    Natija:

    11.12– rasm. Sin() funksiyasidan foydalanish


    11. LOG()- Sonnig natural logarifmni hisoblash.
    So`rov: Select id,name log(staji) from xodimlar;
    Natija:

    11.13– rasm. Log() funksiyasidan foydalanish
    12. BETWEEN() - ko`rsatilgan oraliqdagi ma’lumotlarni chiqarish.
    “xodimlar” jadvalidan staji 2 va 9 oralig’ida bo’lgan ish staji ma’lumotlari chiqaramiz;
    So`rov: Select *from xabar where id between 2 and 9;
    Natija:

    11.14 – rasm. Between() funksiyasidan foydalanish


    13. MID()- ustundagi yozuvlarning bosh harfini shiqarish.
    “xabar” jadvalidagi namelarni bosh harflarini va toliq namelarni nomini chiqaramiz.
    So`rov: Select mid(name ,1,1) as ‘bosh harflar’, name from xabar;
    Natija:

    11.15 – rasm. Mid() funksiyasidan foydalanish


    Foydalanilgan adabiyotlar

    1. www.sql.com

    2. Lear sql with us

    3. Easy sql

    Download 448,64 Kb.
    1   2   3   4   5   6




    Download 448,64 Kb.