Lesson 3 Flashcards

1
Q

BETWEEN

A

determines if a value is between two other values

BETWEEN minValue AND maxValue

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

LIKE

A

when used in a WHERE clause, matches text against a pattern using the two wildcard character %(percentage symbol) and _(underscore symbol)

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

ORDER BY

A

orders selected rows by one or more columns in ascending order

DESC reverses to descending order

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

function/argument

A

A function operates on an expression enclosed in parentheses, called an argument, and returns a value

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

ABS()

A

returns the absolute value

SELECT ABS(-5); – returns 5

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

LOWER()

A

returns lowercase

SELECT LOWER(MySQL); – returns mysql

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

TRIM()

A

removes leading and trailing whitespace

SELECT TRIM(‘ hello ‘); – returns ‘hello’

LTRIM removes leading spaces
RTRIM removes traling spaces

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

HOUR(), MINUTE(), SECOND()

A

returns hour, minute or second from timestamp

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

aggregate function

A

processes values from a set of rows and returns a summary value

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

COUNT()

A

count the number of rows

aggregate function

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

MIN()

A

finds the minimum value

aggregate function

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

MAX()

A

fins the maximum value

aggregate function

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

SUM()

A

sums all the values in the set

aggregate function

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

AVG()

A

computes the arithmetic mean of all the values

aggregate function

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

HAVING

A

used with the GROUPBY clause to filter group results

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

GROUP BY

A

used with aggregate functions to produce summary rows

17
Q

join

A

A join is a SELECT statement that combines data from two tables

18
Q

AS

A

to simplify queries or result tables, a column name can be replaced with an alias

19
Q

INNER JOIN

A

selects only matching left and right table rows

20
Q

FULL JOIN

A

selects all left and right table rows, regardless of match

21
Q

LEFT JOIN

A

selects all left table rows, but only matching left table rows

22
Q

RIGHT JOIN

A

selects all tight table rows, but only matching left table rows

confusing, most avoid its usage

23
Q

UNION

A

combines the two results into one table

24
Q

Equijoin

A
25
Q

Non-Equijoin

A
26
Q

self-join

A

joins a table to itself

27
Q

cross-join

A

combines two tables without comparing columns

28
Q

subquery

A

sometimes called nested or inner query, is a query within another SQL query

29
Q

materialized view

A

view for which view table data is stored at all times

is automatically changed as the underlying data is changed

30
Q

IN

A

used in WHERE clause to determine if a value matches one of several values