Database SQL Part 1 V1
Quiz
•
Computers
•
Professional Development
•
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
15 questions
Searching and Sorting
Quiz
•
University - Professi...
10 questions
Microsoft 365 for Teachers
Quiz
•
Professional Development
10 questions
CyberCrime
Quiz
•
5th Grade - Professio...
10 questions
Introduction to AI - Healthcare & Business
Quiz
•
University - Professi...
15 questions
SEC+ Ch.8 Review Test
Quiz
•
Professional Development
11 questions
5. Echo - Query And ORM
Quiz
•
Professional Development
15 questions
Cloud Computing Model Exam-IV PART-B
Quiz
•
Professional Development
10 questions
CEH Pre Assessment
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
