Script SQL

SELECT *
FROM Sales.Currency;
SELECT CurrencyCode "Kode", Name "Nama Mata Uang"
From Sales.Currency

SELECT FromCurrencyCode "Dari", ToCurrencyCode "Ke", AverageRate "Kurs"
from Sales.CurrencyRate

SELECT DISTINCT FromCurrencyCode "Dari", ToCurrencyCode "Ke", AverageRate "Kurs"
from Sales.CurrencyRate
SELECT DISTINCT FromCurrencyCode "Dari", ToCurrencyCode "Ke", AverageRate "Kurs", CurrencyRateDate "Tanggal Kurs"
from Sales.CurrencyRate

SELECT AverageRate,
AverageRate+AverageRate*0.05 "Kurs Tambah",
(AverageRate+AverageRate*0.05)-0.05 "Kurs Kurang"
from Sales.CurrencyRate

SELECT DISTINCT CurrencyRateDate "Tanggal Kurs", FromCurrencyCode "Dari", ToCurrencyCode "Ke", AverageRate "Kurs", AverageRate+AverageRate*0.05 "Kurs Tambah", (AverageRate+AverageRate*0.05)-0.05 "Kurs Kurang"
from Sales.CurrencyRate

SELECT 'Pada tanggal '+ convert(varchar, CurrencyRateDate)+' Kurs dari USD ke '+ToCurrencyCode+' adalah sebesar '+ convert (varchar, AverageRate)"Laporan"
from Sales.CurrencyRate

0 komentar: