
Quiz 2 Basis Data
Quiz
•
Computers
•
University
•
Medium
Putu Ciptayani
Used 5+ times
FREE Resource
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Gunakan database northwind, manakah perintah SQL yang tidak tepat untuk menampilkan data product dan kategorinya?
SELECT ProductID,ProductName,CategoryID,CategoryName
FROM products NATURAL JOIN categories;
SELECT ProductID,ProductName,CategoryName
FROM products INNER JOIN categories USING(CategoryID);
SELECT ProductID,ProductName,CategoryName
FROM products INNER JOIN categories ON products.CategoryID=categories.CategoryID;
SELECT ProductID,ProductName,CategoryName
FROM products JOIN categories;
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Mekanisme yang dapat digunakan untuk mengubah sintaks pembuatan view adalah:
Menggunakan SQL UPDATE
Menggunakan SQL ALTER
Menggunakan SQL DROP kemudian CREATE
Menggunakan SQL DELETE kemudian CREATE
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Manakah dari view berikut yang bersifat updatable?
CREATE ALGORITHM=MERGE VIEW v_soal
AS SELECT SupplierID,CompanyName,Region FROM suppliers;
CREATE VIEW v_soal
AS SELECT Region, COUNT(SupplierID) AS jumlah FROM suppliers GROUP BY Region;
CREATE ALGORITHM=TEMPTABLE VIEW v_soal
AS SELECT SupplierID,City, Country FROM suppliers;
CREATE VIEW v_soal
AS SELECT DISTINCT Region FROM suppliers;
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Diketahui sintaks pembuatan view seperti berikut:
CREATE VIEW v_soal
AS SELECT ProductID,ProductName,SupplierID,CategoryID,UnitPrice,UnitsInStock FROM products
WHERE SupplierID=7 WITH CHECK OPTION;
Pilih pernyataan yang benar mengenai v_soal
v_soal tidak dapat menambahkan data baru ke dalam tabel products
Jika WITH CHECK OPTION dihilangkan, maka v_soal dapat menghapus semua data dari tabel products
Jika WITH CHECK OPTION dihilangkan, v_soal tidak akan bisa menghapus products dari supplierID 7
WITH CHECK OPTION membuat v_soal hanya bisa melakukan insert data product dengan supplierID 7
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Perintah SQL manakah yang akan menampilkan data produk yang harganya di atas rata-rata harga produk lainnya?
SELECT * FROM products HAVING AVG(UnitPrice) < UnitPrice;
SELECT * FROM products WHERE UnitPrice > AVG(UnitPrice);
SELECT * FROM products WHERE UnitPrice > (SELECT AVG(UnitPrice) FROM products);
SELECT *, AVG(ProductID) AS rata FROM products HAVING UnitPrice > rata;
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
SQL manakah yang akan menampilkan data produk yang tidak pernah terjual (tidak laku)
SELECT * FROM products WHERE productID NOT IN (SELECT ProductID FROM `order details`);
SELECT * FROM products WHERE productID IN (SELECT ProductID FROM `order details`);
SELECT * FROM products NATURAL JOIN `order details` WHERE ProductID IS NULL;
SELECT * FROM products NATURAL JOIN `order details` WHERE ProductID IS NOT NULL;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
SQL manakah yang akan menampilkan data order yang dilakukan oleh customer dari PT ABC
SELECT * FROM orders WHERE CustomerID IN (SELECT CustomerID FROM customers WHERE CompanyName = 'PT ABC')
SELECT * FROM orders WHERE CustomerID = (SELECT CustomerID FROM customers WHERE CompanyName = 'PT ABC')
SELECT orders.* FROM orders NATURAL JOIN customers WHERE CompanyName = 'PT ABC'
Semua benar
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
Database Quiz
Quiz
•
University
23 questions
Java Array
Quiz
•
University
20 questions
HOJAS DE ESTILO
Quiz
•
University
20 questions
Quiz Repitition PL/SQL 31Mei2022
Quiz
•
University
20 questions
Administrasi Sistem Jaringan XII (Database Server)
Quiz
•
University
25 questions
latihan PHP tahap 2
Quiz
•
11th Grade - University
20 questions
UAS Basis Data
Quiz
•
University
20 questions
Pengantar Basis Data
Quiz
•
11th Grade - University
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)
Quiz
•
8th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms
Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms
Quiz
•
11th Grade - University
20 questions
La Hora
Quiz
•
9th Grade - University
7 questions
Cell Transport
Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?
Interactive video
•
4th Grade - University