Section 1

Preview this deck

SUM

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

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (24)

Section 1

(24 cards)

SUM

Front

Function that takes the name of a column as an argument and returns the sum of all the values in that column. SELECT SUM(column_name) FROM table_name;

Back

UPDATE

Front

Allows you to edit rows in a table. UPDATE table_name SET some_column = some_value WHERE some_column = some_value;

Back

Alter Table

Front

Add columns to a table ALTER TABLE table_name ADD column datatype;

Back

COUNT

Front

A function that takes the name of a column as an argument and counts the number of rows where the column is not NULL. SELECT COUNT(column_name)

Back

ROUND

Front

Rounds an integer to the nearest whole number.

Back

SELECT

Front

Used to fetch data from a database. Every query will begin with SELECT.

Back

ORDER BY

Front

Clause that indicates you want to sort the result set by a particular column either alphabetically or numerically. ORDER BY column_name ASC | DESC;

Back

MAX

Front

Function that takes the name of a column as an argument and returns the largest value in that column. SELECT MAX(column_name) FROM table_name;

Back

OUTER JOIN

Front

Will combine rows from different tables even if the join condition is not met. Every row in the left table is returned in the result set, and if the join condition is not met, then NULL values are used to fill in the columns from the right table. SELECT column_name(s) FROM table_1 LEFT JOIN table_2 ON table_1.column_name = table_2.column_name;

Back

MIN

Front

Function that takes the name of a column as an argument and returns the minimum value in that column. SELECT MIN(column_name) FROM table_name;

Back

OR

Front

An operator that filters the result set to only include rows where either condition is true. WHERE column_name = value_1 OR column_name = value_2;

Back

INSERT

Front

Used to add a new row into a table. INSERT INTO table_name (column_1, column_2) VALUES (value_1, value_2);

Back

AND

Front

Operator that combines two conditions. Both conditions must be TRUE for the row to be included in the result. SELECT x FROM y WHERE a=s AND d=r

Back

GROUP BY

Front

Clause that is only used with aggregate functions. It is used in collaboration with SELECT to arrange identical data into groups. SELECT COUNT(*) FROM table GROUP BY column-name;

Back

CREATE TABLE

Front

Creates a new table. Specify name of table and each column in the table.

Back

LIMIT

Front

Clause that lets you specify the maximum number of rows the result set will have. LIMIT number;

Back

DELETE

Front

Statement used to remove rows from a table. DELETE FROM table_name WHERE some_column = some_value;

Back

SELECT DISTINCT

Front

Specifies that the statement is going to be a query that returns unique values in the specified columns. SELECT DISTINCT column_name FROM table_name;

Back

WHERE

Front

Clause that indicates you want to filter the result set to include only rows where the following condition is true.

Back

AS

Front

Keyword that lets you rename a column or table using an alias.

Back

LIKE

Front

Operator used with WHERE clause to search for a specific pattern in a column. WHERE column_name LIKE pattern;

Back

INNER JOIN

Front

Combines rows from different tables if the join condition is true. SELECT column_name(s) FROM table_1 JOIN table_2 ON table_1.column_name = table_2.column_name;

Back

BETWEEN

Front

Operator used to filter the results within a certain range. Values can be numbers, texts, or dates. WHERE column_name BETWEEN val_1 AND val_2

Back

AVG

Front

Aggregate function that returns the average value for a numeric column.

Back