DBMS (1) Flashcards

LESSON 2

1
Q

a fundamental aspect that plays a crucial role in data analysis
These functions summarize and provide valuable insights into your data

A

Aggregate Functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Aggregate Functions sample

A

count,sum, min, max, avg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data can be grouped using SQL (Structured Query
Language) queries. Here are some common SQL clauses
and functions used for grouping data:

A

GROUPING DATa

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

clause is used to group rows that have the
same values into summary rows, such as aggregations.

A

group by

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

clause is used to filter groups based
on aggregate conditions

A

having

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

is a feature in SQL that allows you to generate subtotals
and grand totals in your query result sets. It’ s particularly useful when you want to compute multiple levels of aggregation in a single query.

A

ROLL UP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

operation is similar to ROLLUP but generates all possible combinations of grouping sets.

similar to GROUP BY ROLLUP but more powerful, as it
generates not only subtotal rows but also all possible
combinations of subtotals for the specified columns.

A

CUBE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

clause allows you to specify multiple grouping sets explicitly.

Unlike ROLLUP and CUBE, which generate subtotal rows
according to hierarchical or combinatorial patterns,
_________ lets you define separate
groupings independently.

A

GROUPING SETS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

is a virtual table generated by a
query. It’s essentially a saved SQL query
that acts as a table, allowing users to
retrieve and manipulate data as if it were
a regular table.

A

VIEWS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

is an SQL clause used to query and access data from multiple tables, based on logical relationships between those tables. indicate how SQL Server should use data from one table to select the rows from another table.

A

JOINS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Joins allow you to retrieve data from multiple tables in a single query. This is essential when dealing with relational databases where data is distributed across multiple tables to minimize redundancy and maintain data integrity

A

DATA RETRIEVAL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

is a type of SQL join operation used to combine rows from two tables based on a related column between them. It returns all rows from the left table (referred to as the “left” or “first” table) and the matched rows from the right table (referred to as the “ right” or “ second” table).

A

LEFT JOIN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

is like LEFT JOIN but retrieves all likes with all matching users or NULL if it doesn ‘t have any matching user

A

RIGHT JOIN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

or just JOIN retrieves all users and likes that match each
other ( where the id field in users matches a user_id in the likes table
and vice versa )

A

INNER JOIN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

When applying an SQL INNER JOIN, the output returns only matching rows from the stated tables. In contrast, if you use an SQL _______________, it will retrieve not only the matching rows but also the unmatched rows as well.

A

OUTER JOIN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

returns a result that includes rows from both left and right tables. In case, no matching rows exist for the row in the left table, the columns of the right table will have nulls. Correspondingly, the column of the left table will have nulls if there are no matching rows for the row in the right table.

A

OUTER JOIN

17
Q

the inner SELECT statement,
where one SELECT statement is nested
within another) can return zero or more
rows or expressions. Each _________ must
be delimited by parentheses, and must
contain a Projection clause and a FROM
clause. A _________ can itself contain
other subqueries.

A

subquery

18
Q
A