NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

--Inner Join

--Genel Mantık => Tabloları birleştirmek için kullanıyoruz. Birleştirme işlemi yaparken tablolardaki ortak olan kolon üzerinden birleştirme yapıyoruz
--select * from tablo1 Inner Join Tablo2 on Tablo1.IliskiliKolon = Tablo2.IliskiliKolon

--Tablolara alias(Takma ad) tanımlanabilir
--Select * from Tablo1 t1 Inner Join Tablo2 t2 on t1.IliskiliKolon = t2.IliskiliKolon

--Kullanım
--Hangi personel hangi satışları yapmıştır. Personel ve satışlar tablosuna ihtiyacım var dolasıyla bu iki tabloyu birleştirmem gerekiyor.

select * from Personeller Inner Join Satislar on Personeller.PersonelID = Satislar.PersonelID

select * from Personeller p Inner Join Satislar s on p.PersonelID = s.PersonelID

--Hangi ürün hangi kategoride sadece ürün adını ve yanında kategori adını getirelim

select UrunAdi from Urunler
select KategoriAdi from Kategoriler

select UrunAdi,KategoriAdi from Urunler u Inner Join Kategoriler k on u.KategoriID = k.KategoriID

--where komutu ile,
--Beverages kategorisinden ürünleri listeleyelim
select UrunAdi,KategoriAdi from Urunler u Inner Join Kategoriler k on u.KategoriID = k.KategoriID where KategoriAdi ='Beverages'
--Beverages kategorisindeki ürünlerimin sayısı kaçtır
select KategoriAdi,COUNT(*) from Urunler u Inner Join Kategoriler k on u.KategoriID = k.KategoriID where KategoriAdi ='Beverages' group by KategoriAdi
--Seafood kategorisindeki ürünlerin listesi
select UrunAdi,KategoriAdi from Urunler u Inner Join Kategoriler k on u.KategoriID = k.KategoriID where KategoriAdi ='Seafood'
--Hangi satışı hangi çalışan yapmıştır
select Adi,Count(SatisID) from Personeller Inner Join Satislar on Personeller.PersonelID = Satislar.PersonelID group by Personeller.Adi
--Faks numarası "null" olmayan tedarikçilerden alınmış ürünleri listeleyelim
select * from Urunler u inner join Tedarikciler t on t.TedarikciID = u.TedarikciID where t.Faks <> 'Null'

select * from Urunler u inner join Tedarikciler t on t.TedarikciID = u.TedarikciID where t.Faks is not null
select * from Tedarikciler where Faks != ' '

-- İkiden fazla tabloyu birleştirme

--1997 yılından sonra Nancy'nin satış yatığı firmaların isimleri(1997 dahil)
--(Musteriler,Satislar,Personeller)

select * from Personeller p inner join Satislar s on s.PersonelID = p.PersonelID inner join Musteriler m on s.MusteriID = m.MusteriID where p.Adi ='Nancy' and YEAR(SatisTarihi) >=1997
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.