hard20 pts · first answer countsratio-analysissqlfinancial-analysis
YoY growth query mixes companies
A financials table holds several companies over several years. This query computes year-on-year revenue growth. What is the bug?
SELECT company, fy, revenue,
revenue * 1.0 / LAG(revenue) OVER (ORDER BY fy) - 1 AS yoy
FROM financials;Discussion 0
Join free to post in the discussion.
Related questions
- Calculating the current ratioFinancial Analyst
- Calculating the quick ratioFinancial Analyst
- Year-on-year growthFinancial Analyst
- Compound annual growth rateFinancial Analyst
- Return on equityFinancial Analyst
- Inventory turnoverFinancial Analyst
- Operating margin from EBITFinancial Analyst
- EBITDA marginFinancial Analyst