Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

WGU D521 2

Rating
-
Sold
-
Pages
30
Grade
A+
Uploaded on
17-03-2025
Written in
2024/2025

Exam of 30 pages for the course wgu d521 at wgu d521 (WGU D521 2)

Institution
Wgu D521
Course
Wgu d521

Content preview

1. Which SQL function is used to calculate the total number of rows in a table?

A. COUNT()

B. SUM()

C. AVG()

D. MAX()

Answer: A) COUNT()

Rationale: The COUNT() function is used to return the number of rows in a table

or a result set.




2. What is the purpose of the HAVING clause in SQL?

A. To filter records before grouping

B. To filter records after grouping

C. To limit the number of rows returned

D. To sort the result set

Answer: B) To filter records after grouping

,Rationale: The HAVING clause is used to filter groups of records created by the

GROUP BY clause, whereas the WHERE clause filters rows before grouping.




3. What is the difference between a JOIN and a UNION in SQL?

A. JOIN combines rows from two tables based on a related column; UNION

combines the result sets of two queries

B. JOIN combines columns from two tables; UNION combines rows from two

queries

C. JOIN creates a new table; UNION deletes duplicate rows

D. JOIN can only be used on primary keys; UNION can only be used on foreign

keys

Answer: A) JOIN combines rows from two tables based on a related column;

UNION combines the result sets of two queries

Rationale: A JOIN is used to combine rows from two or more tables based on a

related column, while UNION combines results from multiple queries into a single

result set.




4. Which SQL statement is used to remove a table from the database?

A. DELETE

, B. DROP

C. REMOVE

D. TRUNCATE

Answer: B) DROP

Rationale: The DROP command is used to completely remove a table from the

database, including its structure and data.




5. What is the primary purpose of an Entity-Relationship Diagram (ERD)?

A. To define the data types of fields in a database

B. To visually represent the structure of a database and relationships between

entities

C. To generate SQL queries

D. To store database configuration settings

Answer: B) To visually represent the structure of a database and relationships

between entities

Rationale: ERDs help to model the logical structure of a database, showing

entities, attributes, and the relationships between them.

Written for

Institution
Wgu d521
Course
Wgu d521

Document information

Uploaded on
March 17, 2025
Number of pages
30
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$10.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
douglasmugwe82
5.0
(1)

Get to know the seller

Seller avatar
douglasmugwe82 Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
2
Member since
1 year
Number of followers
0
Documents
4239
Last sold
7 months ago
fully answered questions and answer

fully answered questions and answer

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions