Quantopia.net
Toggle Menu
Home
All Posts
All Posts
Featured Articles
Tools
All Tools
Compound Interest Calculator
Mortgage Calculator
Investment Return Calculator
Inflation Calculator
Quizzes
SQL for Financial Analysis
1. Which SQL aggregate function is most commonly used to calculate total revenue from a 'sales' table with a 'revenue' column?
SUM
AVG
COUNT
MAX
2. Which SQL clauses are essential when generating monthly financial reports (e.g., monthly sales totals)?
WHERE (to filter by date range)
GROUP BY (to group by month)
HAVING (to filter aggregated results)
ORDER BY (to sort by month)
3. The SQL AVG() function can be used to calculate average monthly expenses by grouping data by month.
True
False
4. What SQL clause is used to filter groups of data after using GROUP BY? (one word)
5. Which window function calculates a running total of quarterly sales over a fiscal year?
ROW_NUMBER()
SUM(sales) OVER (ORDER BY quarter)
LAG(sales)
LEAD(sales)
6. Select all SQL functions that help handle NULL values in financial datasets (e.g., missing expense entries).
COALESCE()
IS NULL
NULLIF()
AVG()
7. A RIGHT JOIN in SQL returns all records from the left table, even if there are no matching records in the right table.
True
False
8. What SQL function extracts the month from a date column (e.g., 'order_date')? (function name only)
9. Which SQL operator requires both conditions to be true (e.g., 'revenue > 5000' and 'region = 'Europe'')?
OR
AND
XOR
NOT
10. Which financial metrics can be computed using SQL aggregate functions?
Total Revenue (SUM(revenue))
Profit Margin (SUM(revenue) - SUM(expenses))
Customer Count (COUNT(DISTINCT customer_id))
Average Order Value (SUM(revenue)/COUNT(order_id))
Reset
Answered 0 of 0 — 0 correct