SQL - Movin' on Down (the Stack)
For decades, knowing SQL was the price of admission to serious data analysis. No SQL? You’re stuck in spreadsheet land. But something fundamental has shifted: SQL is moving down the abstraction stack, from interface to infrastructure.
This isn’t about SQL going away. It’s about SQL becoming what it should have always been—the engine, not the steering wheel.
The Spreadsheet / SQL Paradox
Spreadsheets are amazing… until they’re not. That breaking point? It’s exactly where SQL’s power becomes essential:
- Multi-level grouping: Try doing a three-level pivot in Excel. I’ll wait.
- Time-based rollups: Daily to weekly to monthly to quarterly aggregations? Good luck.
- Cross-datasource joins: Combining Salesforce with your warehouse? Not in Sheets.
- Window functions: Running totals, moving averages, rank within groups? Forget it.
So SQL is the answer, right? Just learn SQL and all your problems are solved!
Except… here’s what “quarterly revenue by category and region with growth rates” actually looks like:
WITH quarterly_metrics AS (
SELECT
DATE_TRUNC('quarter', o.order_date) as quarter,
p.product_category,
c.region,
c.customer_segment,
SUM(o.revenue) as total_revenue,
COUNT(DISTINCT o.customer_id) as unique_customers,
AVG(o.order_value) as avg_order_value,
LAG(SUM(o.revenue)) OVER (
PARTITION BY p.product_category, c.region
ORDER BY DATE_TRUNC('quarter', o.order_date)
) as prev_quarter_revenue
FROM orders o
INNER JOIN products p
ON o.product_id = p.id
AND p.is_active = true
INNER JOIN customers c
ON o.customer_id = c.id
LEFT JOIN promotions promo
ON o.promo_code = promo.code
WHERE o.order_date >= '2024-01-01'
AND o.order_status = 'completed'
AND c.region IN ('North', 'South', 'East', 'West')
AND (promo.discount_percent < 50 OR promo.code IS NULL)
GROUP BY
DATE_TRUNC('quarter', o.order_date),
p.product_category,
c.region,
c.customer_segment
)
SELECT
quarter,
product_category,
region,
customer_segment,
total_revenue,
unique_customers,
avg_order_value,
ROUND(
((total_revenue - prev_quarter_revenue) /
NULLIF(prev_quarter_revenue, 0)) * 100,
2) as qoq_growth_percent
FROM quarterly_metrics
WHERE total_revenue > 10000
ORDER BY quarter DESC, total_revenue DESC;
Now imagine you want to:
- Change from quarters to months
- Add another grouping level
- Switch the order of groupings
- Try a different aggregation
Each change means rewriting, re-running, checking for syntax errors, making sure your GROUPs and SELECTs align… It’s death by a thousand parentheses.
The New Abstraction Layer
We now have a continuum of interfaces, each optimal for different moments:
Direct Manipulation
Right-click → Group By
Sometimes this is simply faster than any other method. Need to hide five specific values? Right-click and hide them. It’s faster than typing “exclude X, Y, Z, A, B” and it’s more precise than asking AI to “hide the outliers.”
Drag “Region” to the grouping area
Visual feedback, instant results. You see the structure change as you build it. Want to reorder? Drag the pills around. Some operations are just inherently spatial.
Natural Language
“Show me revenue by quarter for enterprise accounts”
When you know what you want but not how to structure it, conversation wins. The AI handles the JOINs, infers what “enterprise accounts” means in your context, and picks the right aggregations.
Hybrid Moments
Here’s where it gets interesting. Start with a question: “Compare this year to last year.” Then right-click to exclude that weird data point from the acquisition. Then ask: “Now break this down by product category.” Then drag to reorder the categories by business priority instead of alphabetically.
This isn’t about choosing one tool. It’s about having the right tool for each micro-moment in your analysis.
The “Aha” Moments
Watch what happens when someone discovers they can:
Build Complex Hierarchies Instantly
Drag “Year” → “Quarter” → “Month” → “Week” into the grouping area. You’ve just created a time hierarchy that would take 20 lines of SQL with multiple DATE_TRUNC
statements. Change your mind? Drag “Week” out. Done.
Preview Before Committing See your data transform as you build. Add a grouping? Watch the rows collapse. Add an aggregation? See the calculation happen. No more running the full query to discover you forgot a GROUP BY column.
Experiment Without Fear “What if we looked at it by product instead of region?” In SQL, that’s a rewrite. With direct manipulation, it’s dragging one pill out and another in. Two seconds to test a hypothesis.
Stack Operations Naturally Group by region → Filter to top 10 → Group by quarter → Calculate running total. Each step is visible, reversible, and modifiable. The visual pipeline shows exactly what’s happening to your data.
Real Power User Move
Here’s something that takes 30+ lines of SQL but just three clicks in direct manipulation:
“Show me month-over-month growth rates for each product category, but only for categories that had at least $100K revenue last quarter, grouped by region.”
In StarLifter:
- Group by: Region, Product Category, Month
- Filter: Last quarter revenue > $100K (applied to categories)
- Calculate: Month-over-month % change
The system handles the window functions, the subqueries for the filter, the proper JOIN order. You just describe what you want by manipulating the interface.
Why Engineers Love This Too
I know what you’re thinking: “This is for non-technical users.”
Wrong.
I’m technical. I can write complex SQL. But when I’m exploring data, I don’t want to think about syntax. I want to think about insights.
- Faster exploration: Test 10 different groupings in the time it takes to debug one SQL query
- Fewer errors: No more “column must appear in GROUP BY clause” messages
- Better collaboration: Screen-share and anyone can follow what you’re doing
- SQL export: Get the generated SQL when you need it for production
The Abstraction Brings Us Closer
Here’s the counterintuitive part: As we abstract away from SQL, we actually get closer to the business problem.
When you’re debugging a GROUP BY clause, you’re thinking about SQL. When you’re dragging pills to reorder groupings, you’re thinking about what the data means. When you’re asking “What drove the spike in Q3?”, you’re thinking about the business.
The technical abstraction doesn’t distance us from the problem—it removes the distance that SQL syntax created.
The Future Is Already Here
Watch a modern analyst work:
- They start with a question in plain English
- Refine with direct manipulation
- Drill down with another question
- Adjust with a right-click
- Export the final SQL for production
They’re using SQL’s power without touching SQL. They’re moving at the speed of thought, not the speed of syntax.
Next time you need to answer a data question, ask yourself: “Do I want to think about the problem, or about the query?”
The answer will guide you to the right abstraction. And increasingly, that abstraction isn’t SQL—it’s whatever gets you closest to the actual question you’re trying to answer.