No, you do not need machine learning. You need SQL

Some time ago I published a series of tweets about using traditional tools instead of newfangled and complex technologies.
 
 
Tweets went well and got to HackerNews. The consequence of this mini-popularity was an interesting discussion. Some agreed with me, and others called it stupidity and delirium. Well, on the Internet, too, there are gunfights.
 
 
I'm not trying to convince you to use my approach. Rather, I want to explain in more detail what exactly was meant in the initial statement on Twitter.
 
 
Years pass, and you see the emergence of some interesting technologies and concepts: machine learning, blockade, artificial intelligence, virtual reality, augmented reality, etc. - while some of the old technologies are taking to the back burner. Today it's easy to hear about the development of some fantastic products on the block. I've seen blocking services for e-commerce, social networks and real estate. The list can be continued. I hear the words: in order for you to close the round of financing faster and earlier, you need to use the word "block", even if it is not related to the project.
 
 
Some time ago, the trend was machine learning and artificial intelligence. Every new startup was engaged in ML /AI. God forbid to run the project without mentioning AI. Seriously, are you really in business? But in general, it should not be so. One of the technologies that I still appreciate is SQL (Structured Query Language). This more than 40-year technology is as relevant today as it was in 1974. Although over the years it has changed a little, but it's the same power as before.
 
 
I've worked all my life in IT, and spent most of my career in e-commerce - and I've seen with my own eyes how this technology helped grow and scale the business. We used it to identify interesting information in the collected data. Data includes, among other things, consumer behavior, the nature of purchases and habits. This technology made it possible to predict which goods to keep in a warehouse and which are not. She allowed to provide a better service and return customers. Let me tell you how we did it - you can use our experience.
 
 
It's always fun to hear from the founders and potential founders of startups that they want to use AI /ML to better retain customers and increase their lifetime value of[суммарная прибыль или убыток от конкретного потребителя за период сотрудничества с ним — прим. пер.]. In fact, they do not need machine learning at all or some other of these bizarre technologies. Properly written SQL is all they need. In earlier life, I wrote SQL queries to extract valuable information and ideas from the generated data. Once we wanted to find "clients of the week" to congratulate and reward them. Such a simple and unexpected gesture towards clients always leads people into raptures and turns them into evangelists. Often you can see messages on social networks like "Wow, Konga just awarded me a coupon on ₦ 2000 as a client of the week. I did not expect this. Thank you, guys, you are the best. "
 
 
It turned out to be more effective than spending money on advertising. Do not get me wrong, traditional advertising takes place, but nothing compares to a recommendation from a reliable friend. Surprisingly, it was quite easy to get such information. No fancy technology is needed, except for good old SQL. To identify the client of the week, we wrote a SQL query that finds an entry in the order table with the largest order basket per week. Having received this information, we send a letter with gratitude to the client and attach a small coupon /voucher. Guess what happens next? 99% of these people become regular customers. We never needed ML. Just wrote an elementary SQL query - and got this information.
 
 
One day it was necessary to restore contact with customers who stopped buying. Since I was doing this, I wrote a SQL query that selected all clients with the last purchase date of 3 months or more. Again, the query is surprisingly simple. Having received this information, we send an e-mail to the cute letter: "We miss you, come back, and here is your coupon for X Naira"[денежная единица Нигерии — прим. пер.]. The response efficiency has always been more than 50%. And there is always a flurry of messages on social networks. In my opinion, these two strategies have been and remain much more effective than spending on advertising on Google and Facebook.
 
 
We applied the same approach to news broadcasts. Why send out a general newsletter if you can try to personalize it? Decision? I wrote SQL queries to check the contents of the recycle bin and retrieve individual items. From these elements, we were able to generate a newsletter and target the relevant content. Let's say a person bought a pair of shoes, sunglasses and a book. In the dispatch for him we will show shoes, sunglasses and books. This is much more appropriate than sending random things. Why send a letter with a breast pump to a man who just bought a pair of sneakers? It does not even make sense. Typical level of viewing (open rate) of most marketing letters is from 7 to 10%. But when we did a good job, we saw an indicator in the area of ​​25-30%.
 
 
This is three times higher than the industry standard. Another nice feature of these letters is that we addressed people by their names. No "respected customer". Only "dear Celestine", "dear Omin" and so on. This gives the whole shade of humanity. It shows our participation. All thanks to the old good SQL, and not to some bizarre machine learning.
 
 
We helped clients who for some reason did not complete the orders. If they added the goods to the basket, they had the intention to buy it. To help them complete the order, I wrote a SQL script, linked it to a CRON job, and this combination sent emails to customers whose baskets were last updated for 48 hours or more. Guess what happened? It worked. We tracked the letters and concluded that people did return by reference from them. Again, the SQL query was very simple. He chose non-empty baskets with the last update time of 48 hours or more. We launched a daily CRON at 2 am - a time of less activity and traffic. Customers wake up and see in the mail a reminder of their forgotten basket. It's about re-engaging customers. Nothing special, just SQL, Bash and CRON.
 
 
Since payment on the fact is still popular, SQL is again useful. If the customer cancels orders three times in a row, it is placed in a separate "special warning" list. On the next order, he is called and asked if there really is an order. So we save time and nerves. For such customers, payment in fact can be turned off at all, leaving only payment on the card. In e-commerce logistics is expensive, so it makes sense to focus on serious customers. We do not need ML or some bizarre AI for this problem. Again, a fairly well written SQL.
 
 
For orders not delivered at the promised time according to the SLA, we also used SQL-queries. We selected orders with the "Not Delivered" status and the order date equal to or more than 7 days, since this is the standard delivery time. The CRON job sent letters and SMS to such customers. It is clear that the customers did not applaud standing up. But we at least assured that we do not give a damn and we are working to solve the problem. Nothing so annoying as the delay of the order.
 
 
This particular solution also significantly affected the NPS[индекс потребительской лояльности — прим. пер.]. Again, good old SQL and Bash.
 
 
Bonus: Sift Science surprisingly well prevents fraud. But SQL can also be used. If a person tries to pay off three different cards and these cards are rejected one by one, something is amiss. The first and obvious thing to do is temporarily block his account. You will get rid of the big headache of potential cardholders. Do not need to store the card data, just register in the database a card check attempt for a specific order number. To identify such obvious things, ML is not required, but only well-written SQL.
 
 
Machine learning and artificial intelligence are good technologies. In any case, Amazon proved the effectiveness of its business. But if you have a small online store with 1000-10000 customers, then you can get by with SQL. In addition, specialists in ML /AI are not cheap.
 
 
I will be glad to hear what you think.
+ 0 -

Add comment