The screenshot of the Query and the results below is from the question of each number, and saved with the file name: UAS_NIM.docx or UAS_NIM.pdf Create database : - Show the date of the transaction that sells the red shoes - Show the name of the shoe purchased by the customer who has a name with the 2nd character 5 being a vowel - Show the name of the supplier who sells shoes at prices below the average shoe price Jenis_Sepatu: INSERT INTO Jenis_Sepatu values('S-01', 'Sepatu Lari'); INSERT INTO Jenis_Sepatu values('S-02', 'Sepatu Basket'); INSERT INTO Jenis_Sepatu values('S-03', 'Sepatu Soccer'); Supplier: INSERT INTO SUPPLIER Values('MA', 'PT. MitraAdi', 'Jl. Monginsidi 87'); INSERT INTO SUPPLIER Values('SO', 'PT. Shakti Omega', 'Jl. Sudirman 23'); INSERT INTO SUPPLIER Values('SS', 'PT. Sport Station', 'Jl. GunungKelud 8'); Merek: INSERT INTO Merek values('AS', 'Adidas','MA'); INSERT INTO Merek values('DA', 'Diadora','SS'); INSERT INTO Merek values('PA', 'Puma','SO'); INSERT INTO Merek values('RK', 'Reebok','SS'); Customer: INSERT INTO Customer values( 'C-01', 'Adi Kurniawan', 'Jl. Sawentan 48', 'Jakarta'); INSERT INTO Customer values( 'C-02', 'Linda Pujiastuti', 'Jl. Kuda Nil 87', 'Surabaya'); INSERT INTO Customer values( 'C-03', 'Sarbans Edi', 'Jl. Cendrawasih 6', 'Medan'); INSERT INTO Customer values( 'C-04', 'Micheal Budi', 'Jl. Ciliwung 32', 'Semarang'); Sepatu: INSERT INTO Sepatu values( 'FT', 'Flynit', 'S-03', 'DA', 42, 485000 , 'Merah'); INSERT INTO Sepatu values( 'HE', 'Hyperfose', 'S-01', 'RK', 41, 675000 , 'Putih'); INSERT INTO Sepatu values( 'SN', 'Slip On', 'S-02', 'PA', 44, 390000 , 'Biru'); INSERT INTO Sepatu values( 'ML', 'Max Cool', 'S-03', 'AS', 43, 535000 , 'Ungu'); Jenis_Transaksi Insert into Jenis_Transaksi values('KT', 'Kredit'); Insert into Jenis_Transaksi values('TI', 'Tunai'); Transaksi Insert into Transaksi values('2015-01-02', 'C-02', 'SN', 1, 'TI', 390000); Insert into Transaksi values('2015-01-03', 'C-04', 'ML', 2, 'KT', 1070000); Insert into Transaksi values('2015-01-04', 'C-01', 'HE', 1, 'KT', 675000); Insert into Transaksi values('2015-01-05', 'C-03', 'FT', 2, 'TI', 970000); Insert into Transaksi values('2015-01-06', 'C-02', 'HE', 1, 'KT', 675000);
The screenshot of the Query and the results below is from the question of each number, and saved with the file name: UAS_NIM.docx or UAS_NIM.pdf
Create
- Show the date of the transaction that sells the red shoes
- Show the name of the shoe purchased by the customer who has a name with the 2nd character 5 being a vowel
- Show the name of the supplier who sells shoes at prices below the average shoe price
Jenis_Sepatu:
INSERT INTO Jenis_Sepatu values('S-01', 'Sepatu Lari');
INSERT INTO Jenis_Sepatu values('S-02', 'Sepatu Basket');
INSERT INTO Jenis_Sepatu values('S-03', 'Sepatu Soccer');
Supplier:
INSERT INTO SUPPLIER Values('MA', 'PT. MitraAdi', 'Jl. Monginsidi 87');
INSERT INTO SUPPLIER Values('SO', 'PT. Shakti Omega', 'Jl. Sudirman 23');
INSERT INTO SUPPLIER Values('SS', 'PT. Sport Station', 'Jl. GunungKelud 8');
Merek:
INSERT INTO Merek values('AS', 'Adidas','MA');
INSERT INTO Merek values('DA', 'Diadora','SS');
INSERT INTO Merek values('PA', 'Puma','SO');
INSERT INTO Merek values('RK', 'Reebok','SS');
Customer:
INSERT INTO Customer values( 'C-01', 'Adi Kurniawan', 'Jl. Sawentan 48', 'Jakarta');
INSERT INTO Customer values( 'C-02', 'Linda Pujiastuti', 'Jl. Kuda Nil 87', 'Surabaya');
INSERT INTO Customer values( 'C-03', 'Sarbans Edi', 'Jl. Cendrawasih 6', 'Medan');
INSERT INTO Customer values( 'C-04', 'Micheal Budi', 'Jl. Ciliwung 32', 'Semarang');
Sepatu:
INSERT INTO Sepatu values( 'FT', 'Flynit', 'S-03', 'DA', 42, 485000 , 'Merah');
INSERT INTO Sepatu values( 'HE', 'Hyperfose', 'S-01', 'RK', 41, 675000 , 'Putih');
INSERT INTO Sepatu values( 'SN', 'Slip On', 'S-02', 'PA', 44, 390000 , 'Biru');
INSERT INTO Sepatu values( 'ML', 'Max Cool', 'S-03', 'AS', 43, 535000 , 'Ungu');
Jenis_Transaksi
Insert into Jenis_Transaksi values('KT', 'Kredit');
Insert into Jenis_Transaksi values('TI', 'Tunai');
Transaksi
Insert into Transaksi values('2015-01-02', 'C-02', 'SN', 1, 'TI', 390000);
Insert into Transaksi values('2015-01-03', 'C-04', 'ML', 2, 'KT', 1070000);
Insert into Transaksi values('2015-01-04', 'C-01', 'HE', 1, 'KT', 675000);
Insert into Transaksi values('2015-01-05', 'C-03', 'FT', 2, 'TI', 970000);
Insert into Transaksi values('2015-01-06', 'C-02', 'HE', 1, 'KT', 675000);
Step by step
Solved in 4 steps with 1 images