-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathodev_10.sql
More file actions
19 lines (15 loc) · 819 Bytes
/
odev_10.sql
File metadata and controls
19 lines (15 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--city tablosu ile country tablosunda bulunan şehir (city) ve ülke (country) isimlerini birlikte görebileceğimiz LEFT JOIN sorgusunu yazınız.
select city , country
from city c
left join country co
on c.country_id = co.country_id;
--customer tablosu ile payment tablosunda bulunan payment_id ile customer tablosundaki first_name ve last_name isimlerini birlikte görebileceğimiz RIGHT JOIN sorgusunu yazınız.
select payment_id, first_name, last_name
from customer c
right join payment p
on c.customer_id = p.customer_id;
--customer tablosu ile rental tablosunda bulunan rental_id ile customer tablosundaki first_name ve last_name isimlerini birlikte görebileceğimiz FULL JOIN sorgusunu yazını
select rental_id, first_name , last_name
from customer c
full join rental r
on c.customer_id = r.customer_id;