English
Open in Telegram

Post 29. Find Monthly Revenue Growth

27 September 2026
D
Data Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview Resources
29. Find Monthly Revenue Growth WITH monthly_sales AS (     SELECT         DATE_TRUNC('month', o.order_date) AS month,         SUM(oi.quantity * oi.unit_price) AS revenue     FROM orders o     JOIN order_items oi ON o.order_id = oi.order_id     GROUP BY DATE_TRUNC('month', o.order_date) ) SELECT     month,     revenue,     LAG(revenue) OVER (ORDER BY month) AS previous_month_revenue,     ROUND(100.0 * (revenue - LAG(revenue) OVER (ORDER BY month)) / LAG(revenue) OVER (ORDER BY month), 2) AS growth_percentage FROM monthly_sales; 30. Find the Highest Value Order for Each Customer WITH order_values AS (     SELECT         o.customer_id,         o.order_id,         SUM(oi.quantity * oi.unit_price) AS order_value     FROM orders o     JOIN order_items oi ON o.order_id = oi.order_id     GROUP BY o.customer_id, o.order_id ) SELECT * FROM (     SELECT *,            ROW_NUMBER() OVER (                PARTITION BY customer_id ORDER BY order_value DESC            ) AS rn     FROM order_values ) t WHERE rn = 1; Window Functions Covered  • Ranking: ROW_NUMBER(), RANK(), DENSE_RANK()  • Navigation: LAG(), LEAD()  • Aggregates: SUM() OVER()  • Analytics: Running Totals, Revenue Contribution, Month-over-Month Growth  💡 Double Tap ❤️ For More
514 ·

Nearby in the feed

DData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview Resources𝗟𝗲𝘃𝗲𝗹 𝗨𝗽 𝗬𝗼𝘂𝗿 𝗦𝗸𝗶𝗹𝗹𝘀 𝘄𝗶𝘁𝗵 𝗧𝗵𝗲𝘀𝗲 𝗚𝗮𝗺𝗲-𝗖𝗵𝗮𝗻𝗴𝗶𝗻𝗴 𝗖𝗼𝘂𝗿𝘀𝗲𝘀! ​ Looking to learn practical, in-demand skills? These courses cover Generative AI, Cybersecurity, AI toolDData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview ResourcesSQL Project Series #4 E-Commerce Sales Analysis – Advanced SQL with Window Functions 🚀 Window functions are widely used by Data Analysts to calculate rankings,
this message
DData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview Resources🎓 𝗛𝗔𝗥𝗩𝗔𝗥𝗗 𝗨𝗡𝗜𝗩𝗘𝗥𝗦𝗜𝗧𝗬 𝗙𝗥𝗘𝗘 𝗢𝗡𝗟𝗜𝗡𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 😍 Dreaming of learning from one of the world’s most prestigious universities? Explore Harvard’s online courses and builDData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview Resources🚀 SQL Project Series #5 E-Commerce Sales Analysis – Advanced Business Analytics In this part, we'll solve real-world business problems that Data Analysts encoun
DData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview ResourcesData Analytics Projects - SQL, Excel, Tableau, Python & Power BI Interview Resources@sqlproject · channel · Tech
39 664subscribers554average post reach
Venue feed Open in Telegram

An open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · Index limits · Remove a page · Catalog · Search · How we count