Skip to content

BunyodNaimov/postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

1. Categories jadval barcha ustun ma’lumotlarini bilan qaytaring.

SELECT * FROM categories 

изображение

2. Categories jadval category_name va description ustun ma’lumotlarini qaytaring.

select category_name, description from categories

изображение

3. Categories jadval barcha ustun ma’lumotlari olishda ustun nomlarini o’zbekcha tarjimada qaytaring. M-n: category_name=Nomi

select
    category_id as id,
    category_name as nomi,
    description as tavsifi,
    picture as rasmi
from categories

изображение

4. Categories jadvaldan kategoriya nomi ’Confections’ ga teng bo’lgan ma’lumotlarni qaytaring.

select
*
from categories
where category_name='Confections'

изображение

5. Categories jadvaldan kategoriya nomi ‘Produce’ yoki ‘Seafood’ bo’lgan ma’lumotlarni qaytaring.

select
*
from categories
where category_name='Produce'

изображение

6 Categories jadvaldan quyida belgilangan ma’lumotlarni qaytaring.

select *
from categories
limit 3 offset 5

изображение

7. Categories jadvaldan ma’lumotlarni description alifbo bo’yicha Z-A tartibida chiqaring.

select description
from categories
order by description desc

изображение

8. Customers jadvalidan barcha ma’lumotlarni oling.

select *
from customers

изображение

9. Customers jadvalida ustun nomlarini o’zbekcha holatda oling.

select customer_id   as mijoz_id_si,
       company_name  as kampaniya_nomi,
       contact_name  as kantakt_nomi,
       contact_title as kontakt_sarlavhasi,
       address       as manzil,
       city          as shahar,
       region        as mintaqa
from customers

изображение

10. Customers jadvalidan contact_title ‘Owner’ bo’lgan ma’lumotlarni qaytaring

select *
from customers
where contact_title='Owner'

изображение

11. Customers jadvalidan city ‘London’ bo’lgan ma’lumotlarni qaytaring.

select *
from customers
where city='London'

изображение

12. Customers jadvalidan region ustun NULL bo’lgan ma’lumotlarni qaytaring.

select *
from customers
where region is null

изображение

13. Customers jadvalidan region ustun NULL bo’lmagan ma’lumotlarni qaytaring.

select *
from customers
where region is not null

изображение

14. Customers jadvalidan country ustun Germany bo’lgan ma’lumotlarni qaytaring.

select customer_id,company_name,contact_name,region,country
from customers
where country='Germany'

изображение

15. Customers jadvalidan country ustun Germany bo’lgan qatorlar sonini qaytaring.

select count(*)
from customers
where country='Germany'

изображение

16. Customers jadvalidan fax ustun NULL bo’lmalgan ma’lumotlarni contact_name ustun alifbo tartiba tartiblab qaytaring.

select contact_name, fax
from customers
where fax is not null
order by contact_name asc

изображение

17. Employees jadvaldan barcha ma’lumotlarni qaytaring.

select *
from employees

изображение

18. Employees jadval ustun nomlarini o’zbekcha qaytaring.

select
    employee_id as ishchi_id_si,
    last_name as familia,
    first_name as ism,
    title as lavozim,
    title_of_courtesy as xushmuomalalik_unvoni,
    birth_date as tugilgan_sana,
    hire_date as ishga_qabul_qilingan_date,
    address as manzil,
    city as shahar,
    region as mintaqa
from employees

изображение

19. Employess jadvaldan title_of_courtest ‘Mr’ bo’lgan xodimlarni firts_name alifbo tartibida qaytaring.

select first_name, title_of_courtesy
from employees
where title_of_courtesy='Mr.'
order by first_name asc

изображение

20. Employes jadvalda title ‘Sales Representative’ bo’lgan xodimlar sonini qaytaring.

select count(*)
from employees
where title='Sales Representative'

изображение

21. Employes jadvalda hire_date 1994-yilda bo’lgan ma’lumotlarni qaytaring.

select *
from employees
where hire_date between '1994-01-01' and '1994-12-31'

изображение

22. Employes jadvaldan region NULL bo’lmagan xodimlarni first_name, last_name, title, city,

home_phone ma’lumotlarini first_name Z-A alifbo tartibida qaytaring.

select  region,first_name, last_name, title, city,home_phone
from employees
where region is not null
order by first_name asc 

изображение

23. Orders jadvaldan customer_id ‘VINET’ bo’lgan buyurtmalarni qaytaring.

select  *
from orders
where customer_id='VINET'

изображение

24. Orders jadvaldan order_date ustuni orqali 1996-yildagi ma’lumotlarni qaytaring.

select  *
from orders
where order_date between '1996-01-01' and '1996-12-31'

изображение

25. Orders jadvaldan ship_region ustun NULL bo’lmagan ma’lumotlarni qaytaring.

select  *
from orders
where ship_region is not null

изображение

26. Orders jadvaldan order_id 10300 va 10400 orasida bo’lgan ma’lumotlarni qaytaring.

select  *
from orders
where order_id between 10300 and 10400

изображение

27. Order Details jadvaldan unit_price ustun umumiy qiymatini qaytaring

select  sum(unit_price)
from order_details

изображение

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages