
SYS 1591
Authored by Ade Maulana
Computers
University
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
ECM3434 Business Analysis 1 - Business process modelling
Quiz
•
University
13 questions
MULTIMEDIA ANIMATION
Quiz
•
University
15 questions
python basics
Quiz
•
11th Grade - University
10 questions
Quiz CodeIgniter 4
Quiz
•
University
15 questions
DBMS LAB QUIZ
Quiz
•
University
13 questions
AI-1
Quiz
•
KG - University
10 questions
GODOT ENGINE
Quiz
•
University
10 questions
ECM3434 Business Analysis 1 - Data Modelling
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
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
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University