Notes & writing

Blog

Revenue Operations, payments and data analytics — practical notes from running RevOps and analytics at scale.

Thinking and expertise from Anthony, written with Claude.

How to Pivot Data in SQL: PIVOT vs CASE WHEN

Turn rows into columns in SQL with CASE WHEN or PIVOT. Copy-paste examples for PostgreSQL, SQL Server, Snowflake and DuckDB, plus how to unpivot.

sqlpivotdata analysisduckdb

Spec-Driven Development with Claude Code: My Setup

How I use spec-driven development with Claude Code to build a real site: the six docs, the rules that keep chat out of them, and a real session.

claude codeai for analystsworkflowspec-driven development

First-Principles Thinking for Data Analysts

What first-principles thinking means for a data analyst, with worked examples: questioning a metric, a benchmark and a dashboard request.

analyst craftproblem solvingdata analytics

Break-Even Analysis for Pricing, Step by Step

Calculate break-even units, margin of safety, and the extra volume a discount actually requires to stay profit-neutral, with worked examples.

pricingbreak-even analysisfinancedata analytics

Claude Code for Data Analysis: A Beginner Setup

How an analyst can set up Claude Code to work with CSV files, SQL and Python safely. Project folder, context file, permissions, Git and a first session.

claude codeai for analystsworkflowdata analytics

Building a Simple Data Analyst AI Agent With Claude

What separates an AI agent from a chatbot for analyst work, a minimal worked example, and the guardrails to put around it before it touches real data.

aiclaude codedata analyticsautomation

Data Analyst Portfolio Projects That Get Interviews

What hiring managers look for in a data analyst portfolio, how to choose three strong projects, and how to present each one around a business problem.

data analyst portfoliocareerhiringdata analytics

DAX Variables (VAR): Why They Fix Half Your Measures

VAR...RETURN makes DAX measures faster, easier to debug and easier to read. See the syntax, the performance reason, and the one gotcha with context transition.

power bidaxdata analyticscalculate

Power BI Row-Level Security: A Practical Setup

Set up Power BI row-level security step by step, static and dynamic, plus the pitfalls that let data leak past a security role.

power birow level securitydata analyticssecurity

What Is a Semantic Layer, and Why AI Analytics Needs One

A semantic layer defines your metrics once so people, dashboards and AI all use the same numbers. Learn what it is, what it changes for text-to-SQL, and how to start small.

semantic layerai analyticsmetricsdata analytics

Excel vs SQL vs Power BI: How an Analyst Chooses

Which tool for which job? A practical way to choose between Excel, SQL and Power BI, based on data size, repeatability, audience and who needs to reuse the work.

excelsqlpower bitools

Data Storytelling for Non-Technical Stakeholders

How to present analysis so busy, non-technical people act on it. A simple structure, slide habits, and the mistakes that make good analysis get ignored.

data storytellingcommunicationstakeholdersdata analytics

Slow Power BI Report? 7 Fixes in Order of Payoff

A slow Power BI report usually has a few clear causes. Measure with Performance Analyzer first, then apply these seven fixes, biggest payoff first.

power biperformanceoptimizationdata modeling

Prompting an LLM for SQL You Can Trust

How to get reliable SQL from ChatGPT, Claude or Copilot. What context to give, how to use examples, and the checks that catch wrong joins and made-up columns.

llmsqlprompt engineeringai for analysts

Power Query vs DAX: Where Each Step Belongs

Not sure whether to clean data in Power Query or calculate in DAX? Use this simple rule, with examples for calculated columns, measures and the M language.

power bipower querydaxdata modeling

SQL CTE vs Subquery vs Temp Table: Which to Use

CTE, subquery or temp table? A plain-English comparison for analysts, with examples, the performance trade-offs, and a simple rule for choosing.

sqldata analyticsctequery performance

How to Find and Fix Duplicate Rows in SQL

Find duplicate rows in SQL with GROUP BY and ROW_NUMBER, then remove them safely. Copy-paste queries, the traps to avoid, and how to stop duplicates coming back.

sqldata qualitydata cleaningdata analytics

Cohort Retention Analysis in SQL, Step by Step

Build a cohort retention table in SQL in three steps. Includes a full PostgreSQL query, how to read the triangle, and the mistakes that skew retention.

sqlcohort analysisretentiondata analytics

Power BI design: model first, then calculation groups

A practical guide to Power BI design: star schema, calculation groups, field parameters and dashboard layout habits that keep reports fast and easy to maintain.

power bidata modelingdaxdashboard designbusiness intelligence

Power BI Copilot: what it can and can't do today

What Copilot in Power BI does well, where it breaks, and how to test it on your own semantic model before business users start trusting its answers.

power bicopilotbusiness intelligenceai analytics

Sales forecast accuracy: measure it, stop sandbagging

Learn how to measure sales forecast accuracy with WAPE and bias, why a perfect team total can hide rep-level errors, and how to spot sandbagging in your data.

forecastingrevenue operationssales pipelinesql

Why AI analysts fail on bad metric definitions

AI can write valid SQL in seconds, but it can't know which definition of revenue your CFO approved. Why a governed metrics layer matters, with benchmark data.

text-to-sqlai analyticssemantic layerbusiness intelligencedata governance

SQL window functions: 10 patterns for real analysis

Window functions keep your rows while you calculate across them. Learn ten patterns: ranking, deduplication, running totals, LAG, cohorts and streaks.

sqlwindow functionsdata analysispayments analytics

The RevOps Data Quality Audit: A 10-Point Checklist

Bad CRM data quietly breaks forecasts and reports. Use this 10-point revenue data audit with ready-to-run SQL checks to find and fix the biggest gaps.

revopsdata qualitycrmsqlrevenue operations

Why False Declines Cost E-commerce More Than You Think

False declines turn good customers away. See what the data says about their cost, why they happen, and how to measure and reduce them in e-commerce.

paymentsfalse declinesauthorization ratee-commerce

Attribution vs. Incrementality vs. MMM: Which to Use When

Attribution, incrementality tests and marketing mix modeling answer different questions. Learn when to use each, with evidence from field experiments.

marketing analyticsattributionincrementalitymarketing mix modeling