Section 1

Preview this deck

DISTINCT

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

1

All-time users

1

Favorites

0

Last updated

1 year ago

Date created

Mar 1, 2020

Cards (37)

Section 1

(37 cards)

DISTINCT

Front

Unique: data is not normally clean so we want to make sure that there are no repetitions on the same observations when filtering data

Back

A<B

Front

A is less than B

Back

;

Front

end of the code not the end of each statement only at every end of each statement

Back

AVG

Front

function that returns the average value of a numeric column

Back

AND,OR

Front

used to filter records based on more than one condition

Back

_

Front

represents a character

Back

SELECT

Front

select of extract data from a database

Back

COUNT

Front

count how many

Back

NOW()

Front

a function that returns the current date and time

Back

%

Front

a place holder to replace text

Back

LEFT JOIN

Front

returns all records from the left table (A) and the matched records from the right table (B) the result is NULL from the right side, if there is no match

Back

ORDER BY

Front

sort the result test

Back

LEFT JOIN

Front

How many different urls are there for the original tweets and retweets respectively?

Back

YEAR()

Front

a function returns an integer value which represents the year of the specified date

Back

MONTH()

Front

a function returns an integer value which represents the month of a specified date

Back

MIN

Front

minimum smallest value of the selected column

Back

A/B

Front

A is divided by B

Back

WHERE

Front

filter the record with a condition

Back

LIMIT

Front

limit the number of rows returned from a result set

Back

DATEDIFF()

Front

a function to return the difference between two date values

Back

*

Front

every observation

Back

GROUP BY

Front

group rows that have the same values into summary rows often used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns

Back

A>B

Front

A is bigger than B

Back

"" or "

Front

we put strings or text inside this "" to let SQL know anything inside "" should not be considered as other data format

Back

CREATE TABLE

Front

creates a new table in the database

Back

IS NOT NULL

Front

thus we are filtering the missing data

Back

MAX

Front

maximum largest value of the selected column

Back

INNER JOIN

Front

selects records that have matching values in both tables

Back

INNER JOIN

Front

Display twitter_id, text and media_url where media_url is not null

Back

DESC

Front

descending order use with ORDER BY

Back

ASC

Front

ascending order use with ORDER BY

Back

!=

Front

is not

Back

!=""

Front

we are filtering blank obs.

Back

DAY()

Front

a function returns an integer value which represents the day of the specified date

Back

FROM

Front

where the table is

Back

HAVING

Front

is added as WHERE cannot be used with aggregate functions; often used with the GROUP BY to filter groups based on specific condition; if group by is omitted the HAVING clause behaves like WHERE clause

Back

LIKE

Front

an operator used in a WHERE clause to search for a specified pattern in a column

Back