← Back to SightQL
Issue #1 โ€” One actionable data tip per day
Thursday, April 10, 2026
๐Ÿ’ก Tip of the Day
BEGINNER SQL

The one SQL query every business owner should know

If you learn nothing else about SQL, learn this pattern. It answers the question: "How is my business doing this month compared to last month?"

SELECT DATE_TRUNC('month', order_date) AS month, COUNT(*) AS orders, SUM(total) AS revenue, ROUND(AVG(total), 2) AS avg_order FROM orders WHERE order_date >= CURRENT_DATE - INTERVAL '2 months' GROUP BY 1 ORDER BY month DESC;

Why this matters: Month-over-month comparison is the single most powerful way to spot trends. Revenue up 15%? Something is working. Down 10%? Investigate immediately. No spreadsheet pivots needed.

๐Ÿช Industry Spotlight: E-Commerce
E-COMMERCE

Your repeat purchase rate is more important than new sales

Most e-commerce businesses obsess over customer acquisition. But the math is clear:

5-15%
Average repeat purchase rate
25-40%
Top performers achieve this
5-25ร—
Cheaper to retain than acquire
67%
More spend from repeat customers

Track this weekly:

-- What % of this month's orders are from repeat buyers? SELECT COUNT(CASE WHEN order_count > 1 THEN 1 END)::float / COUNT(*) * 100 AS repeat_pct FROM ( SELECT customer_id, COUNT(*) AS order_count FROM orders WHERE created_at >= DATE_TRUNC('month', CURRENT_DATE) GROUP BY customer_id ) t;

If your repeat rate is below 20%, stop spending on ads and start spending on retention: email sequences, loyalty programs, better post-purchase experience.

๐Ÿง  Daily Data Quiz

You run a SaaS with 500 active subscribers at $49/mo. Your churn rate is 5%/month. How much new MRR do you need each month just to break even?

๐Ÿ› ๏ธ Tool Spotlight

PostgreSQL: The database your business deserves

If you are still running your business on spreadsheets or SQLite, consider PostgreSQL:

Why PostgreSQL?

  • Free and open source
  • Handles millions of rows without breaking a sweat
  • Window functions for running totals, rankings, and trends
  • JSON support for flexible data (no strict schema needed)
  • Connects to every BI tool: Metabase, Superset, SightQL

Getting started: Supabase and Neon offer free PostgreSQL databases that you can set up in 2 minutes. No server management needed.

Want answers, not queries?
SightQL turns plain English into charts. No SQL required.

Try the Demo

๐Ÿ“‹ Browse all SQL cheat sheets โ†’