WEEK 11 (PRE-FINALS) Flashcards

(31 cards)

1
Q

are built-in operations that perform specific tasks on data.

A

SQL FUNCTIONS

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

These functions can be used in SQL queries to manipulate, aggregate, or analyze data.

A

SQL Functions

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

are the one who work on single row and return one output per row.

A

Single Row Functions

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

For example, length and case conversion functions are __________

A

Singe Row Functions

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

work upon group of rows and return one result for the complete set of rows.

A

Multi-Row Functions

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

Multi-Row functions are also known as?

A

Group Functions

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

Accepts character input and returns number or character value.

A

Character Functions

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

What is the under the Character Functions

A

CONCAT
LENGTH
SUBSTR
INSTR
LPAD
RPAD
TRIM
REPLACE

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

What are the aggregate functions

A

AVG
SUM
COUNT
MAX
MIN

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

It returns the average of all values in the given column.

A

AVG()

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

What is the syntax for AVG

A

SELECT AVG(col_name) from table_name;

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

It returns the sum of all values in the given column.

A

SUM()

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

What is the syntax for SUM

A

SELECT SUM(< col_name >) from < table_name >;

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

It returns the no. of rows in the given column.

A

COUNT()

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

What is the syntax for COUNT

A

SELECT COUNT (< col_name >) from < table_name >

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

It selects the MAXIMUM value in the specified column.

17
Q

What is the syntax for MAX

A

SELECT MAX(< col_name >) from < table_name >;

18
Q

It selects the MINIMUM value in the specified column.

19
Q

What is the Syntax for MIN

A

SELECT MIN(< col_name >) from < table_name >;

20
Q

What are the types of string functions

A

UPPER(x)
LOWER(x)
INSTR
SUBSTR
CONCAT
LPAD
RPAD

21
Q

It converts the string ‘X’ to UPPER case

22
Q

It converts the string to ‘X’ to LOWER case

23
Q

function returns numeric position of a character or a string in a given string.

24
Q

Returns the substring of given string starting from position integer ‘m’ and length integer ‘n’

A

SUBSTR(x,m,n)

25
adds string to its left.
LPAD
26
function concatenates two string values
CONCAT
27
adds string to its right.
RPAD
28
What are the types of numeric functions
ROUND(value, decimal) TRUNCATE(x, y) MOD(value, divisor)
29
Rounds value to decimal places.
ROUND(value, decimal)
30
Truncate values of “x” up to “y” decimal places.
TRUNCATE(x, y)
31
Returns remainder of value divided by divisor.
MOD(value, divisor)