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
A row of vessels with equal fill heights grouped across a selection boundary

How Does TOP WITH TIES Work in SQL Server? – Interview Question of the Week #159

February 4, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Order By, SQL Scripts, SQL Server

Question: How Does TOP WITH TIES Work in SQL Server?

Answer: This is an ancient question I just encountered in the recent Comprehensive Database Performance Health Check.

Read More
A mineral specimen drawer with one sample set aside for individual inspection

How to Drop All the User Created Statistics by SQL Server? – Interview Question of the Week #158

January 28, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL DMV, SQL Performance, SQL Scripts, SQL Server, SQL Statistics

SQL Server creates statistics on its own, but DBAs and the Tuning Advisor add more. Here is a script to drop all user Created Statistics safely.

Read More
Different fallen leaves are sorted so one of each kind can be counted

How to Find DISTINCT COUNT of Column Rows Without Using Distinct Count Keywords? – Interview Question of the Week #157

January 21, 2018
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Scripts, SQL Server

Only one of ten candidates solved this: find the DISTINCT COUNT of a column without using those keywords. Here are the traditional answer and the trick.

Read More
Each of three trays displays its two tallest stones ahead of shorter stones

How to Get Top N Records Per Group? – Ranking Function – Interview Question of the Week #156

January 14, 2018
Pinal Dave
SQL Interview Questions and Answers
Ranking Functions, SQL Function, SQL Scripts, SQL Server

I gave 40 candidates this puzzle: get the top N records per group from a student marks table. Here is the simple answer using a Ranking Function.

Read More
Different mechanical gear types surround one table-like central hub

How to List All the Nonclustered Indexes of Your Table? – Interview Question of the Week #155

January 7, 2018
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, ColumnStore Index, SQL Index, SQL Scripts, SQL Server

How do you list all the clustered and nonclustered indexes of your table, including columnstore? Here is the script I use in my performance health checks.

Read More
One reserved work area is much larger than the material it currently holds, while another waits

How to List Queries With Memory Grant and Execution Plan? – Interview Question of the Week #154

December 31, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL DMV, SQL Memory, SQL Scripts, SQL Server

A workshop customer suspected one of their queries used too much memory. Here is the script I gave them to list running queries with Memory Grant and plan.

Read More
Different column structures are cataloged in a single orderly stone rack

How to List All ColumnStore Indexes with Table Name in SQL Server? – Interview Question of the Week #153

December 24, 2017
Pinal Dave
SQL Interview Questions and Answers
Clustered Index, ColumnStore Index, SQL DMV, SQL Index, SQL Scripts, SQL Server

Question: How to List All ColumnStore Indexes with Table Name in SQL Server? As ColumnStore Indexes are getting more and more popular.

Read More
Previous 1 … 19 20 21 22 23 24 25 … 58 Next
  • Books
  • Testimonials
  • Privacy Policy

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