This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
The real SSMS Spatial results tab next to the query that produced it: 16 lines from the center pin to the grid points exactly the square root of 65 away, each 8.062 units long

Erdős Unit Distance Problem: What It Is and What AI Found

September 29, 2026
Pinal Dave
AI
AI, Mathematics, Spatial Database, SQL Scripts

The Erdős unit distance problem asks how many pairs of points can sit exactly one unit apart. Paul Erdős guessed the answer in 1946, and the guess stood for eighty years. In May 2026, an OpenAI model found a counterexample. I checked the grid trick behind it in SQL Server, spatial queries included.

Read More
Three views of tea: stirring with a spoon, swirling after removal, and gradually settling.

Navier-Stokes Problem: What It Is and What AI Found

September 18, 2026
Pinal Dave
AI
AI, Mathematics

The Navier-Stokes problem in plain words: what the famous fluid question asks, what AI says it found, and why it is not official yet.

Read More
Fermat Left a Note in a Margin. Other People Spent 358 Years Finishing It.

Fermat Left a Note in a Margin. Other People Spent 358 Years Finishing It.

September 14, 2026
Pinal Dave
AI
Mathematics

That note kept mathematicians busy for the next three and a half centuries. Let us talk about what Fermat left in a margine.

Read More
A straight hazel rod lying through the middle of scattered crocuses on a lawn, running on past them over bare grass.

A Simple Linear Regression Trend Line in T-SQL

December 1, 2023
Pinal Dave
SQL Tips and Tricks
Mathematical Function, Mathematics, SQL Scripts, SQL Server

Calculate linear regression slope, intercept, monthly predictions, and R-squared in T-SQL while keeping extrapolation limits clear.

Read More
A potato ricer above regular portions and a smaller final remainder

Loan Amortization Schedules With a Recursive CTE

April 16, 2014
Pinal Dave
SQL Tips and Tricks
CTE, Mathematics, SQL Datatype

Why does the last loan payment leave a few cents behind? A recursive CTE, a rounding rule and a final reconciliation fix it.

Read More
Two middle pasta bundles stand in a wooden measure between shorter and longer bundles

Median on Big Tables: PERCENTILE_CONT vs a Two-Row Seek

November 5, 2013
Pinal Dave
SQL Tips and Tricks
Mathematics, SQL Index, SQL NULL, SQL Order By

Two ways to get a median, one tiny demo, and the traps in NULLs, even counts and empty tables. Then measure on your own server.

Read More
An unmarked ring mandrel beside rings with differing diameter and thickness

Cosine, Euclidean or Dot: Picking a Vector Distance Metric

June 16, 2013
Pinal Dave
SQL Tips and Tricks
AI, Mathematics, SQL Server

Cosine, Euclidean and dot can rank the same vectors differently. Here are tiny examples you can check by hand, plus how to choose.

Read More
1 2 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com