NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#2. hafta#

Select * From Employees

Select E.* From Employees E

Select E.FirstName,E.LastName From Employees E

Select E.* From Employees E Where E.EmployeeID =1

Select E.* From Employees E Where E.EmployeeID =1

Select * From Employees Where EmployeeID =1

Select * From Employees Where Country ='USA'

Select E.*
From Employees E
Where E.Region IS NULL

Select *
From Employees
Where TitleOfCourtesy='Dr.'

Select *
From Employees
Where FirstName Like 'N%'

Select *
From Employees
Where FirstName Like '_n%'

Select *
From Employees
Where FirstName Like '__d%'

--isminin baş harfi a soyadının son harfi r olan çalışanlar
Select *
From Employees
Where FirstName Like 'a%' AND LastName Like '%r'

Select *
From Employees
Order By BirthDate Desc

Select *
From Employees
Order By FirstName

--İşi satışla ilgili olan (Sales) tüm personeli ada göre alfabetik sıralı bir şekilde listeleyin.
Select *
From Employees
Where Title Like '%sales%'
Order By FirstName

Select *
From Products

--c ile başlayan ürünleri stok miktarına göre artan bir şekilde listeleyin.

Select *
From Products
Where ProductName Like 'c%'
Order By UnitsInStock

--Fiyatı 10 ile 25 arasında olan tüm ürünleri fiyat bilgisine göre azalan bir şkeilde listeleyiniz
Select *
From Products
Where UnitPrice Between 10 And 25
Order By UnitPrice Desc

--Tüm ürünlerin toplam tutarını, adlarını, birim fiyatlarını, stok miktarlarını toplam fiyata göre azalan bir şekilde listeleyin.
Select
P.ProductName,
P.UnitPrice,
P.UnitsInStock,
(P.UnitPrice * P.UnitsInStock) AS 'TotalPrice'
From Products P
Order By TotalPrice Desc


--Ürünler tablosundan tüm ürünlerin Ürün adı, Birim fiyat, Stok, Toplam Fiyat, Kdv Tutarı, Kdvli Toplam Fiyat bilgilerini stok miktarına göre azalan bir şekilde listeleyin

Select
P.ProductName,
P.UnitPrice,
P.UnitsInStock,
(P.UnitPrice * P.UnitsInStock) 'TotalPrice',
((P.UnitPrice * P.UnitsInStock) * 0.18) 'Kdv',
((P.UnitPrice * P.UnitsInStock) * 1.18) 'KdvTotalPrice'
From Products P
Order By UnitsInStock Desc

--Tüm ürünlerin toplam birim fiyatını bulun.

Select
SUM(P.UnitPrice) 'TotalPrice'
From Products P

--Tüm ürünlerin ortalama fiyatını bulun
Select
AVG(P.UnitPrice) 'Avg'
From Products P

--Tüm ürünleri içerisinden fiyarı ortalama fiyatın altında olan ürünleri listeleyin.
Select *
From Products
Where UnitPrice < (Select
AVG(P.UnitPrice)
From Products P)
Order By UnitPrice

--Tüm ürünleri içerisinden stok miktarı ortalamastom miktarının üstünde olan ürünleri listeleyin.
Select
*
From Products
Where UnitsInStock > (Select AVG(UnitsInStock) From Products)

Select * From [Order Details]

--Her üründen kaç adet sipariş verildiğini gösterin.
Select
ProductID,
SUM(Quantity) 'TotalQuantity'
From [Order Details]
Group By ProductID
Order By ProductID

Select * From [Order Details] Order By ProductID

--Her üründen ne kadar tutarında sipariş verildiğini gösterin.
Select
ProductID,
SUM(UnitPrice) 'TotalPrice'
From [Order Details]
Group By ProductID
Order By ProductID


     
 
what is notes.io
 

Notes.io is a web-based application for 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 12 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.