Definitions Flashcards
(24 cards)
combines the result sets of two or more SELECT statements into a single result set without duplicate rows
Union
combines the result sets of two or more SELECT statements into a single result set with duplicate rows
Union ALL
Syntax for UNIONS
SELECT column1, column2 FROM table1
UNION
SELECT column1, column2 FROM table2;
Pairs each row from the first table with every row from the second table without any specific condition.
Cross Join
Cross Join Syntax
SELECT column 1,
FROM table1
CROSS JOIN table2;
Does not use the ‘ON’ Clause
Cross Join
Used when you need to count occurrences or distinct values within specific groups or categories, usually with aggregate functions.
GROUP BY
Often used in combination with aggregate functions to perform calculations on each group of data.
Group By
Returns the difference between two dates and calculates the number of units between two dates.
DATEDIFF()
This is used to further filter the result set groups provided by the GROUP BY clause.
HAVING
This function will round a number value to a specified number of places.
ROUND( )
ROUND SYNTAX
SELECT column 1,
ROUND(AVG(column 2), 2)
FROM table 1
WHERE column 1 = x;
A unique identifier for each record in a table. Ensures no duplicate values.
Primary Key
A field (or collection of fields) in one table that uniquely identifies a row of another table. Establishes a relationship between tables.
Foreign Key
A function which perform a calculation on a set of values and return a single value
Aggregate Functions
Foreign Key
A field (or collection of fields) in one table that uniquely identifies a row of another table. Establishes a relationship between tables.
Primary Key
A unique identifier for each record in a table. Ensures no duplicate values.
a systematic way to measure and assign the value of specific touch points along the consumer journey.
A marketing attribution model
What is attribution Modeling?
a way of measuring the impact of different marketing efforts across the customer journey.
Used for filtering rows before grouping.
Where
Used for filtering groups after grouping.
Having
combines rows vertically from different queries.
UNION ALL
Combines rows horizontally using a specific column
FULL OUTER JOIN
Ads that businesses pay for to appear at the top of Google’s search results
Google Search Ads