sqlsunday.com

T-SQL tips and tricks, best practices and query plans from the field.

Skip to content
  • sqlsunday.com
    • About
  • Structured Concepts
    • Master data tool
    • Send passwords
  • Slack app
  • Presentations
  • Downloads
  • Checklists
    • Installing SQL Server 2014
    • Installing SQL Server 2016
    • Installing SQL Server 2017
    • Installing SQL Server 2019
    • Installing SQL Server 2022
    • Links and utilities
Search

bars

How to build a histogram in T-SQL

2014-09-142014-07-25 / Daniel Hutmacher / 1 Comment

Talk to SQL Server developers or DBAs about histograms, and they’ll inevitably think of index statistics. However, a task you may encounter some day is to calculate the distribution of numbers in a table. And although there’s no quick built-in function to do this, it’s not as difficult as you may think.

Continue reading →

Microsoft Most Valuable Professional
  • Mastodon
  • WordPress
  • LinkedIn
  • Twitter
  • Facebook
  • GitHub
  • RSS Feed

Search

Categories

  • By difficulty (201)
    • Advanced (42)
    • Basics (58)
    • Intermediate (103)
  • CLR (1)
  • Code review (1)
  • Datasets (1)
  • Off-topic (14)
  • Rant (6)
  • Scripts (20)
  • Series (33)
    • Efficient data (10)
    • Introduction to T-SQL (1)
    • Slowly changing dimensions (5)
    • SQL Server security (17)
  • SQL Server concepts (85)
  • T-SQL (148)
  • Tips (59)
  • Uncategorized (1)
  • Videos (2)
Daniel Hutmacher, Structured Concepts AB

SQL SERVER HELP YOU CAN DEPEND ON.

Need SQL Server help?

At Structured Concepts, we specialize in SQL Server development and performance tuning, as well as technical training for users and developers.

Visit our homepage at strd.co.

Mastodon
Create a website or blog at WordPress.com
  • Follow Following
    • sqlsunday.com
    • Join 184 other followers
    • Already have a WordPress.com account? Log in now.
    • sqlsunday.com
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar