SQL Functions Flashcards

1
Q

What is an Aggregating function?

A

An aggregating function takes a list of values and returns just one value

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

Name the Aggregating Functions

A

SUM, COUNT, MAX, MIN, ROUND, AVG

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

What does the ORDER BY function do?

A

The ORDER BY causes orders or sorts a result based on the values in one or more specific columns.

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

What does the GROUP BY function do?

A

Divides the rows in a table into smaller groups

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

What clause can be used to filter rows BEFORE aggregation?

A

The WHERE clause

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

What clause can be used to filter rows AFTER aggregation?

A

The HAVING clause

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

What does the LEFT() function do?

A

Returns the leftmost characters from the string

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

What is a CASE statement used for?

A

You can use a CASE statement to put values into categories

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

What does the COALESCE function do?

A

Returns the first non-NULL value in the list, or NULL if there are no non-NULL values.

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

What does a Null value indicate?

A

an unknown value or “not applicable”

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