Celestine Omin's profile picture
Celestine Omin
@cyberomin
View on Twitter

It's always fun when I speak to founders and potential founders and they are quick to tell me how they want to use AI/ML to improve customer retention and improve LTV. Truth is, they don't even need ML. A properly written SQL is what you need.

In a former life, I used to write SQL to extract customer of the week. Basically, select from orders table where basket size is the biggest. We will then email a nice thank you note to this customer and attach a small coupon/voucher....

...Guess what? 99% of these people became repeat customers. We never needed ML. We just wrote a simple SQL and got this information. We did the same thing for customers who last shopped 3 or so months ago....

...I will write a query like select from order table where last shop date is 3 or greater months. When we get this information, we will send a nice "we miss you, come back and here's X Naira voucher" email. The conversation rate for this one was always greater than 50%.

It was and still is a lot more effective than spending on Google and Facebook ads. We applied this same thinking to newsletters. I wrote SQL to check basket content and target relevant marketing emails to these people.

I mean, why send a letter with breast pumps to a man that just bought a pair of sneakers? It doesn't even make sense. Typical open rate for most marketing emails is anywhere between 7 - 10%. But when we do our work well, we saw close to 25 - 30%.

This is 3x more than the industry standard. Another nice touch for those emails was that we addressed people by their names. No Dear Customer. It was always Dear Celestine, Dear Omin, etc. It brought a human touch to the whole game.

Another nice SQL script paired with CRON jobs was the one that reminded people of carts that was left for more than 48 hours. Select from cart where state is not empty and last date is more than or equal to 48hrs....

Set this as a CRON that fires at 2AM everyday, period with less activity and traffic. People wake up to emails reminding them about their abandoned carts. Then sit watch magic happens. No AI/ML needed here. Just good 'ol SQL + Bash.

Since POD was big and still is a thing, SQL yet again came in handy. Customers that will cancel orders three consecutive times will be placed under RED. Next time the other, you will call and make sure they actually needed the item...

All together, you can disable POD for them and it present card or wallet payment. Cost of shipping is expensive, you want to invest that on serious customers. You don't even need ML for this one. Again, well written SQL was all you needed.

Sift Science is doing amazing job with fraud prevention. But SQL can come in handy too. If a person tries to checkout with 3 different cards at the same time and they all bounced, something funny is happening. Block their account temporary for a while.

You will be saving the potential card owners lots of headache. You don't need to store card details, just store card checkout attempt for a particular order number and you will be fine. These are low hanging fruits that need no ML but we'll written SQL.

An order is running late? SQL comes in too. Select from orders where status is not delivered and order date >= 7 days. As this is the standard delivery period. Pair this with a CRON job that fires email and SMS to customers.

While they will not immediately jump and clap for you. It will at the very least reassure them that you are and someone is actually looking at their problem. Nothing is as annoying as delayed orders.

This particular one has a dramatic effect on NPS. Again, good 'ol SQL + Bash saving the day.

The End..

Last year, this article shook a few things - https://cyberomin.github.io/startup/2018/07/01/sql-ml-ai.html. I still maintain that position that SQL is still as relevant. Do you have a large sea of SQL data lying around? I am happy to help you make sense out of it. DM is open.

Help us raise more money for charities by sharing this content ♥️
Wait! Before you go...
Grab Exclusive Deals for Books, Courses, Software.
100% of Profits Are Donated To Research-Backed Charities.