Database SQL Part 1 V1
Quiz
•
Computers
•
Professional Development
•
Practice Problem
•
Hard
Md. Bhuiyan
Used 9+ times
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Evaluate the following SQL statement:
SQL> select cust_id, cust_last_name "Last name"
FROM customers WHERE country_id = 10 UNION -
SELECT cust_id CUST_NO, cust_last_name FROM customers WHERE country_id = 30
Identify three ORDER BY clauses either one of which can complete the query.
ORDER BY "Last name"
ORDER BY 2, cust_id
ORDER BY CUST_NO
ORDER BY 2, 1
ORDER BY "CUST_NO"
2.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which three statements are true regarding the WHERE and HAVING clauses in a SQL statement? (Choose three.)
WHERE and HAVING clauses cannot be used together in a SQL statement.
The HAVING clause conditions can have aggregate functions.
The HAVING clause conditions can use aliases for the columns.
The WHERE clause is used to exclude rows before the grouping of data.
The HAVING clause is used to exclude one or more aggregated results after grouping data.
3.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which two statements are true about Data Manipulation Language (DML) statements?
An INSERT INTO...VALUES.. statement can add multiple rows per execution to a table.
An UPDATE... SET... statement can modify multiple rows based on multiple conditions on a table.
A DELETE FROM..... statement can remove rows based on only a single condition on a table.
An INSERT INTO... VALUES..... statement can add a single row based on multiple conditions on a table.
A DELETE FROM..... statement can remove multiple rows based on multiple conditions on a table.
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Examine the structure of the MEMBERS table. You want to display details of all members who reside in states starting with the letter A followed by exactly one character.
Which SQL statement must you execute?
SELECT * FROM MEMBERS WHERE state LIKE '%A_';
SELECT * FROM MEMBERS WHERE state LIKE 'A_';
SELECT * FROM MEMBERS WHERE state LIKE 'A_%';
SELECT * FROM MEMBERS WHERE state LIKE 'A%';
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You want to display 5 percent of the rows from the SALES table for products with the lowest AMOUNT_SOLD and also want to include the rows that have the same even if this causes the output to exceed 5 percent of the rows.
AMOUNT_SOLD -
Which query will provide the required result?
SELECT prod_id, cust_id, amount_sold FROM sales ORDER BY amount_sold FETCH FIRST 5 PERCENT ROWS WITH TIES;
SELECT prod_id, cust_id, amount_sold FROM sales ORDER BY amount_sold FETCH FIRST 5 PERCENT ROWS ONLY WITH TIES;
SELECT prod_id, cust_id, amount_sold FROM sales ORDER BY amount_sold FETCH FIRST 5 PERCENT ROWS WITH TIES ONLY;
SELECT prod_id, cust_id, amount_sold FROM sales ORDER BY amount_sold FETCH FIRST 5 PERCENT ROWS ONLY;
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Examine the structure of the MEMBERS table:
Name Null? Type
------------------ --------------- ------------------------------
MEMBER_ID NOT NULL VARCHAR2 (6)
FIRST_NAME VARCHAR2 (50)
LAST_NAME NOT NULL VARCHAR2 (50)
ADDRESS VARCHAR2 (50)
You execute the SQL statement:
SQL > SELECT member_id, ' ' , first_name, ' ' , last_name "ID FIRSTNAME LASTNAME " FROM members;
What is the outcome?
It fails because the alias name specified after the column names is invalid.
It fails because the space specified in single quotation marks after the first two column names is invalid.
It executes successfully and displays the column details in a single column with only the alias column heading.
It executes successfully and displays the column details in three separate columns and replaces only the last column heading with the alias.
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
You execute the following commands:
SQL > DEFINE hiredate = '01-APR-2011'
SQL >SELECT employee_id, first_name, salary
FROM employees -
WHERE hire_date > '&hiredate'
AND manager_id > &mgr_id;
For which substitution variables are you prompted for the input?
none, because no input required
both the substitution variables ''hiredate' and 'mgr_id'.
only hiredate'
only 'mgr_id'
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
14 questions
Web Basic
Quiz
•
Professional Development
13 questions
SCORE
Quiz
•
Professional Development
10 questions
FitTalks - MongoDB
Quiz
•
Professional Development
15 questions
Sec+ Quiz - 3
Quiz
•
Professional Development
10 questions
ChatGPT for Work
Quiz
•
Professional Development
17 questions
SQL - parte 1
Quiz
•
Professional Development
12 questions
Cycle 4: Session 8 Review.
Quiz
•
Professional Development
14 questions
Day 1 - Basics of Java
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
