Blog,  SQL

SQL QUIZ TIME

SQL (Structured Query Language), veritabanı yönetim sistemlerinde veri sorgulama, güncelleme ve yönetme için kullanılan bir dildir.

Kategori: SQL Değerlendirme

/5
0 oylar, 0 ort
26

SQL Orta Seviye Quiz 1

SQL quiz helps us to increase our knowledge

1 / 5

Products tablosunda stokta olan ürünlerin toplam sayısını bulmak için hangi SQL sorgusu kullanılır?

2 / 5

employees tablosunda her departmandaki çalışanların ortalama maaşını hesaplamak için hangi SQL sorgusu kullanılır?

3 / 5

products tablosunda price sütunu 100'den büyük olan ürünleri listelemek için hangi SQL sorgusu kullanılır?

4 / 5

Bir orders tablosunda order_date sütunu 2023 yılına ait olan kayıtları seçmek için hangi sorgu kullanılır?

5 / 5

Bir veritabanında, employees tablosunda tüm çalışanların maaşlarını 10% artırmak için hangi SQL sorgusu kullanılır?

Puanınız

Ortalama puan şöyledir 26%

0%

/5

SQL Değerlendirme

SQL Orta Seviye

1 / 5

Bir orders tablosunda order_date sütunu 2023 yılına ait olan kayıtları seçmek için hangi sorgu kullanılır?

2 / 5

Bir products tablosunda price sütunu 100 ile 500 arasında olan ürünleri seçmek için hangi sorgu kullanılır?

3 / 5

Bir orders tablosunda en yüksek toplam satışa sahip müşteriyi seçmek için hangi sorgu kullanılır?

4 / 5

Bir sales tablosunda her departmandaki toplam satış miktarını hesaplamak için hangi sorgu kullanılır?

5 / 5

Bir employees tablosunda her bölümdeki çalışan sayısını 10'dan fazla olan bölümleri seçmek için hangi sorgu kullanılır?

Puanınız

Ortalama puan şöyledir 20%

0%

English SQL QUIZ

1 / 4

Which SQL statement is used to insert new data in a database?

2 / 4

Except
Previously we learned the concept of INTERSECT, now lets see how EXCEPT works.
EXCEPT is directly opposite to that of INTERSECT.
EXCEPT retrieves unique records from the first SELECT statement that are not present in the output of the second SELECT statement.

Below is the format for the same:

SELECT * FROM table_1
EXCEPT
SELECT * FROM table_2;
Task
Consider the same supermarket database we used in the previous problem.
Write a query to output the name of the fruits (f_name) from the table 'fruit' which are not present in the table inventory.
f_name column has the name of the fruits and inv_name has the name of the items in inventory.

Expected output
┌────────┐
│ f_name │
├────────┤
│ Apple │
│ Mango │
│ Orange │
└────────┘

3 / 4

The INTERSECT operator combines two SELECT statements, but only returns the rows that are common to both SELECT statements.

Below is the format for the same:

SELECT * FROM table_1
INTERSECT
SELECT * FROM table_2;
Task
Consider a supermarket database

Table 'fruit' has the list of all fruits available in the market(few of them could be out of stock).
Table 'inventory' has the updated list of items in the supermarket.
Write a query to find the list of fruits available in the supermarket. (f_name column has the name of the fruits and inv_name has the name of the items in the inventory, you are suppose to output the name of the fruits.)

Expected output
┌────────────┐
│ f_name │
├────────────┤
│ Banana │
│ Cherry │
│ Grape │
│ Kiwi │
│ Pear │
│ Pineapple │
│ Watermelon │
└────────────┘

4 / 4

What is the difference between UNION and UNION ALL in SQL?

Puanınız

Ortalama puan şöyledir 19%

0%

Bir cevap yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir