Forum

Sorgu birleştirme g...
 
Bildirimler
Hepsini Temizle

Sorgu birleştirme group by

1 Yazılar
1 Üyeler
0 Likes
769 Görüntüleme
(@ozguraltinel)
Gönderiler: 244
Reputable Member
Konu başlatıcı
 

Merhaba.

Aşağıda 5 ayrı sorgu var. Hepsinin ilk kolonları İsimlerden oluşmakta. 

Ben bunları birleştirmek istiyorum. Birleştirdiğim sorguda İlk kolonda isimler olacak, diğer sonuçlar yanyana gelecek.

Yardımcı olurmusunuz?

 

 

select Isim, COUNT(*) AS toplamgorusme from Kayitlar where year(tarih)=2018 and month(tarih)=3 and day(tarih)=22 and Departman='IGM' and Sure<'7500' GROUP BY Isim
select Isim, COUNT(*) AS gidentel from Kayitlar where year(tarih)=2018 and month(tarih)=3 and day(tarih)=22 and Departman='IGM' and gelengiden=1 and Sure<'7500' GROUP BY Isim
select Isim, COUNT(*) AS gelentel from Kayitlar where year(tarih)=2018 and month(tarih)=3 and day(tarih)=22 and Departman='IGM' and gelengiden=2 and Sure<'7500' GROUP BY Isim
select Isim, avg(Sure) as OrtalamaGorusmeSuresi_Gelen from Kayitlar where year(tarih)=2018 and month(tarih)=3 and day(tarih)=22 and Departman='IGM' and gelengiden=2 and Sure<'7500' GROUP BY Isim
select Isim, avg(Sure) as OrtalamaGorusmeSuresi_Giden from Kayitlar where year(tarih)=2018 and month(tarih)=3 and day(tarih)=22 and Departman='IGM' and gelengiden=1 and Sure<'7500' GROUP BY Isim

 
Gönderildi : 23/03/2018 13:49

Paylaş: