APPLICATIONS DETAILED PREPARATION PACK
2026
◉ HAVING clause is used in conjunction with GROUP BY clause
Answer: ex.) GROUP BY CountryCode
HAVING SUM (Population) > 23000000
*HAVING clause must appear before the ORDER BY clause
◉ Aggregate functions like SUM(Salary) ignore NULL functions!
Answer: it will ignore rows with NULL salaries and just add up the
other ones
SUM(Salary) + SUM(Bonus) is NOT the same as SUM(Salary +
Bonus)
SUM(Salary) + SUM(Bonus) will add the largest salary value with the
largest bonus value
The other one will return the largest values ignoring NULL
,◉ join statement Answer: this combines data from two different
tables, known as left and right tables, into a single result
a join compares a foreign key of one table to the primary key of
another
ex.) WHERE Manager = ID
◉ AS keyword Answer: to simply queries, a column name can be
replaced with an alias. This alias follows the column name separated
by an optional AS keyword
ex.) SELECT Department.Name AS Group
◉ Two common join clauses:
INNER JOIN
FULL JOIN Answer: INNER JOIN selects only matching left and right
table rows.
FULL JOIN selects all left and right table rows, regardless of match.
(unmatched rows just return NULL)
, ◉ LEFT JOIN
RIGHT JOIN
Outer join Answer: LEFT JOIN selects all left table rows, but only
matching right table rows.
RIGHT JOIN selects all right table rows, but only matching left table
rows.
any join that selects unmatched rows, including left, right, and full
joins
◉ equijoin
non-equijoin Answer: compares columns of two tables with the =
operator.
compares columns with an operator other than =, such as < and >.
◉ self join Answer: Joins a table to itself
A.Name = Name column of the left table
B.Name name column of the right table
ex.)