-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDistinct ve Count.sql
More file actions
30 lines (17 loc) · 1020 Bytes
/
Distinct ve Count.sql
File metadata and controls
30 lines (17 loc) · 1020 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
select distinct rental_rate from film; -- rental_rate sutunundaki benzersiz verileri süzdürüyoruz unique
select distinct replacement_cost from film;
select * from actor
where first_name = 'Penelope';
select count(*) from actor
where first_name = 'Penelope'; -- adı 'Penelope' olan actor tablosundaki kişilerin sayısını getir bize diyoruz COUNT(*) İLE
select count(*) from actor
where first_name like 'P%'; -- baş harfi P ile başlayanların sayısını getir diyoruz.
select count(*) from actor
where first_name like 'A%';
select count(first_name) from actor
where first_name like 'A%';
select count (*) from actor; -- actor tablosunda kaç satır verimiz var onu veriyor 200.
select count (distinct first_name) from actor; -- count(distinct first_name) actor tablosundaki birbirinden farklı
--first_name Sütünu verilerinin sayısını bana getir.
select count (distinct length) from film; -- uzunluğu benzersiz olan length sutunundaki verilerin sayısı,
select distinct length from film;