
AI Engineering at Experian | Tableau Ambassador | Author & Creator of SQL Short Reads | Lecturer at the University of Texas at Dallas | YouTube @ChrisMPerry
Dallas, Texas
Joined March 2019
- Tweets2.8K
- Following350
- Followers253
- Likes5.6K
Complex logic. Simple query.
SQL views let you write the hard part once (joins, filters, distinct counts, aggregations) and reuse it with one SELECT.
Key idea: a regular view stores the query, not the results. Same definition, always-current data.
Bonus: in Oracle, you can read a view's SQL back with ALL_VIEWS.
I spent about 6 hours yesterday developing my logistic regression lecture materials for my business analytics students only to come to the end and say to myself, “hmm, am I going to actually be able to fit this into a single lecture.”
How does SQL compare a row to the one before it?
LAG() pulls a value from an earlier row in a defined order, so month-over-month change becomes simple math.
88 seconds, one example, every step shown.
#SQL #DataAnalytics
Two products tie at $999 for 12th place. What rank does the next one get?
👉 ROW_NUMBER → 14
It ignores ties and numbers every row.
👉 RANK → 14
Tied rows share 12, then it skips 13.
👉 DENSE_RANK → 13
Tied rows share 12, with no gap.
💡 Why it matters
If bonuses go to the product managers of the "top 5 products," ties can change who gets paid. With the right data, RANK might pay out owners of 6 products while DENSE_RANK pays 8. Same data, two extra bonuses, all because of one function name.
📌 Rule of thumb
- Need a unique position? → ROW_NUMBER
- Want ties to "use up" places, like in sports? → RANK
- Want ties without gaps? → DENSE_RANK
Save this for your next window-function query 💾
#SQL #DataAnalytics #DataEngineering
With the advent of Claude design and image generation capabilities from model providers, I read more BS than ever in PowerPoint decks.
Chris Perry retweeted
FULL JOIN = membership in both directions.
Employees without a department and departments without employees show up in one query.
Careful: COUNT(*) counts the NULL rows too.
FULL JOIN = membership in both directions.
Employees without a department and departments without employees show up in one query.
Careful: COUNT(*) counts the NULL rows too.
Full walkthrough here: sqlshortreads.com/sql-fundam…
37 filters. Zero guidance.
That’s not flexibility. That’s homework.
Every filter we add gives users another decision to make before they can get to the actual decision that matters.
Flexibility has value. But so does simplicity.
A great dashboard doesn’t just give users options. It gives them direction.
Are we making dashboards easier to use, or just easier to build?
A chart without context leaves the audience guessing.
Up from what? Down compared to when? Ahead of which target?
A number alone rarely tells the whole story.
If the comparison drives the decision, don’t leave it invisible.
Chris Perry retweeted
Millions of rows. A handful of insights. One decision.
Great analysts don’t just analyze data. They reduce complexity, identify what matters, and turn information into action.
The goal isn’t more information. It’s better decisions.
#dataanalytics #businessintelligence #dataanalysis
Millions of rows. A handful of insights. One decision.
Great analysts don’t just analyze data. They reduce complexity, identify what matters, and turn information into action.
The goal isn’t more information. It’s better decisions.
#dataanalytics #businessintelligence #dataanalysis
Database access gives an AI agent data.
Organizational knowledge gives it context.
Who owns the process? What’s the source of truth? What exceptions matter?
Without that, even a confident answer can be wrong.
One of the most underrated uses of AI?
Building your own curriculum.
Pick almost anything you want to learn and AI can help you create:
A structured learning path
Practice exercises
Quizzes
Projects
Hints and explanations
Feedback on your mistakes
A plan that adapts as you improve
That changes the question from:
“Where can I find a course on this?”
to:
“How do I want to learn this?”
AI is not just an answer engine.
It can be a learning system built around you.
But there’s one habit that matters just as much as knowing how to use AI:
Stay curious about whether what it’s teaching you is actually correct.
Use AI to accelerate learning, not to replace verification.
Hear me out…
print() is great.
Until your code actually matters. 😅
Because “something failed” is a lot less useful than knowing:
• what happened
• when it happened
• where it happened
• how serious it was
• and whether you can inspect it later
That’s where logging earns its keep.
print() helps you peek.
Logging helps you investigate. 🔎
And once your scripts become pipelines, apps, APIs, or production systems, that difference starts to matter a lot.
Not every metric deserves your attention.
Some metrics are interesting.
Others change what you do next.
The real question is:
Can someone make a different decision because they know it?
The same metric can be framed two ways:
• one describes what happened
• the other helps decide what to do next
Good analytics should do more than inform.
It should create direction.






