Today we are going to see another such puzzle – The Flight Connection Puzzle. This blog post is going to be really fun blog post.
Running Distinct Counts: Working Around COUNT(DISTINCT) OVER
Your report wants unique customers so far, and SQL Server refuses COUNT(DISTINCT) over a window. Flag each first appearance and add up the flags instead.
Schema-Level Permissions: Granting on a Schema, Not Each Object
Apply schema-level permissions to a database role, include future tables automatically, separate internal data, and review grants.
Given-When-Then for Database Tests
Use Given-When-Then for readable database tests with known input, explicit THROW checks, and transaction rollback after each case.
SQL SERVER – Difference Between ISNULL and COALESCE
SQL Server provides two commonly used functions, ISNULL and COALESCE, to address this requirement. Difference Between ISNULL and COALESCE
SQL SERVER – Count Occurrences of a Specific Value in a Column
Here is the exact question – How to Count Occurrences of a Specific Value in a Column? Well, honestly, the answer is very simple.
Exact Vector Search Cost: Filtering Before VECTOR_DISTANCE
Measure exact vector search with VECTOR_DISTANCE, reduce candidates through indexed filters, and compare plans and measured IO.







