SYS 1591
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Ade Maulana
Used 4+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Berikut adalah struktur tabel employees. Anda ingin menampilkan nama-nama karyawan yang memiliki gaji lebih tinggi dari rata-rata gaji di departemen mereka. Pilih kueri yang tepat:
SELECT name
FROM employees
WHERE salary > AVG(salary);
SELECT name
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT name
FROM employees
HAVING salary > AVG(salary);
SELECT name
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees WHERE department = employees.department);
2.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Berikut adalah struktur tabel orders. Anda ingin menampilkan total jumlah pesanan yang dilakukan oleh setiap pelanggan pada tanggal tertentu. Pilih kueri yang tepat:
SELECT customer_id, SUM(total_amount)
FROM orders
WHERE order_date = '2024-04-16';
SELECT customer_id, SUM(total_amount)
FROM orders
GROUP BY customer_id
WHERE order_date = '2024-04-16';
SELECT customer_id, SUM(total_amount)
FROM orders
WHERE order_date = '2024-04-16'
GROUP BY customer_id;
SELECT customer_id, SUM(total_amount)
FROM orders
WHERE order_date = '2024-04-16'
ORDER BY customer_id;
3.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Anda ingin menampilkan nama-nama karyawan yang memiliki gaji lebih tinggi dari gaji rata-rata seluruh karyawan di perusahaan. Pilih kueri yang tepat:
SELECT name
FROM employees
WHERE salary > AVG(salary);
SELECT name
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);
SELECT name
FROM employees
HAVING salary > AVG(salary);
SELECT name
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees WHERE department = employees.department);
4.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Manakah pernyataan di bawah ini yang merupakan contoh DDL (Data Definition Language)?
Manakah pernyataan di bawah ini yang merupakan contoh DDL (Data Definition Language)?
SELECT * FROM employees;
CREATE TABLE customers (id INT PRIMARY KEY, name VARCHAR(50));
UPDATE employees SET salary = salary * 1.1 WHERE department = 'Sales';
ALTER TABLE orders ADD COLUMN order_date DATE;
5.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Manakah pernyataan di bawah ini yang merupakan contoh DML (Data Manipulation Language)?
Manakah pernyataan di bawah ini yang merupakan contoh DML (Data Manipulation Language)?
INSERT INTO products (name, price) VALUES ('Keyboard', 25.00);
DROP TABLE customers;
ALTER TABLE employees ADD COLUMN email VARCHAR(100);
CREATE INDEX idx_name ON employees (name);
6.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Apa pernyataan yang benar tentang DDL dan DML dalam MySQL?
Apa pernyataan yang benar tentang DDL dan DML dalam MySQL?
DDL digunakan untuk memanipulasi data dalam tabel, sedangkan DML digunakan untuk mendefinisikan struktur database.
DDL digunakan untuk menambahkan, menghapus, atau memperbarui data dalam tabel, sedangkan DML digunakan untuk membuat atau mengubah struktur tabel.
DDL digunakan untuk membuat, mengubah, atau menghapus tabel atau struktur database, sedangkan DML digunakan untuk menambah, menghapus, atau memperbarui data dalam tabel.
DDL dan DML dapat digunakan secara bergantian dalam MySQL tanpa perbedaan yang jelas antara keduanya.
7.
MULTIPLE CHOICE QUESTION
1 min • 10 pts
Bagaimana sintaks yang benar untuk menambahkan referensi ke tabel lain menggunakan ALTER TABLE di MySQL?
ALTER TABLE table_name
ADD CONSTRAINT constraint_name FOREIGN KEY (column_name)
REFERENCES referenced_table(column_name);
ALTER TABLE table_name
ADD COLUMN column_name FOREIGN KEY
REFERENCES referenced_table(column_name);
ALTER TABLE table_name
ADD FOREIGN KEY constraint_name (column_name)
REFERENCES referenced_table(column_name);
ALTER TABLE table_name
ADD REFERENCE constraint_name FOREIGN KEY (column_name)
REFERENCES referenced_table(column_name);
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
Round 1: Get to know US :)
Quiz
•
University
10 questions
GIS - Coordinate Systems
Quiz
•
University
10 questions
Google Workspace
Quiz
•
University
11 questions
Capítulo 3
Quiz
•
University - Professi...
10 questions
Hands-on Modul 3
Quiz
•
University
10 questions
PYTHON BASICS PART 1
Quiz
•
University
10 questions
Visual Basic 2010
Quiz
•
8th Grade - University
10 questions
CS100||MsWord
Quiz
•
University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
