Featured Post

SQL Query: 3 Methods for Calculating Cumulative SUM

Image
SQL provides various constructs for calculating cumulative sums, offering flexibility and efficiency in data analysis. In this article, we explore three distinct SQL queries that facilitate the computation of cumulative sums. Each query leverages different SQL constructs to achieve the desired outcome, catering to diverse analytical needs and preferences. Using Window Functions (e.g., PostgreSQL, SQL Server, Oracle) SELECT id, value, SUM(value) OVER (ORDER BY id) AS cumulative_sum  FROM your_table; This query uses the SUM() window function with the OVER clause to calculate the cumulative sum of the value column ordered by the id column. Using Subqueries (e.g., MySQL, SQLite): SELECT t1.id, t1.value, SUM(t2.value) AS cumulative_sum FROM your_table t1 JOIN your_table t2 ON t1.id >= t2.id GROUP BY t1.id, t1.value ORDER BY t1.id; This query uses a self-join to calculate the cumulative sum. It joins the table with itself, matching rows where the id in the first table is greater than or

Predictive Analytics - A Case Study

Nishad Sharma, a Delhi-based entrepreneur, is a typical online shopper who keeps a tab on the various sales and promotional deals run by e-commerce companies from time to time. On the cool Delhi evening of February 4, he opened online fashion company Myntra's app on his smartphone to see if there were any deals on trousers. That day, Myntra was running its Rush Hour sale in which customers could avail up to 50 per cent discount on select products. After filtering his search, Sharma decided to add a pair of UCB trousers to his shopping cart.


Predictive Analytics

But then he changed his mind. Perhaps he could get a better deal if he logged on into a sale on a weekend. To his surprise, Sharma received a mail from Myntra next morning, telling him what he presumably lost by abandoning his cart the previous day. The same product was now available at a 100 per cent mark-up. To close the sale, the company sent another mail to Sharma a couple of days later, offering a smaller discount of 20 per cent. Sharma couldn't let it go waste a second time round.

The systematic and gentle hounding of Sharma points at a big shift in the way e-commerce players target customers. Says Myntra's chief strategy officer Prasad Kompalli, "Gone are the days of sending irrelevant mail shots to one and all. 


Today we are in a position to identify and reach out to our customers." To make this possible on a large scale, e-commerce firms are sprucing up their predictive analytics skills and the attendant infrastructure to understand who their most valuable customers are.

Predictive analytics factors in all possible variables that help the marketer devise the right strategy to generate the desired engagement with customers - from providing timely and accurate sales forecasting insights, to equipping them with opportunities to improve diagnosis and the design of their websites to accommodate the pressures of any shopping blitzkrieg. 


These insights can range from what time of the day your website can witness maximum traffic, what products/pages will receive high impressions, which region you can expect the bulk of the orders to come from (to help in the planning of logistics and cash on delivery options) and the like.

Read more

Comments

Popular posts from this blog

How to Fix datetime Import Error in Python Quickly

Explained Ideal Structure of Python Class

How to Check Kafka Available Brokers