SQLHacks for Microsoft SQL Server

Home page

Administration

Dates & Times

Data Manipulation

FAQs

Optimization

Summaries


Site Map



About us

  • About us
  • Copyrights
  • Credits
  • Disclaimers
  • Guaranties
  • Privacy
  • Support policies

Feedback

Summary

MS SQL Server Summaries

Summaries

  • Group by all with MSSQL
  • How many duplicates do I have in the database
  • How to calculate grand totals with SQL Server
  • How to do calculations based on a running total with MSSQL
  • How to get a running total with MSSQL
  • How to get averages without high and low values with MSSQL
  • How to get both the details and the subtotals with SQL Server
  • How to get the first or the last in a group with MSSQL
  • How to get the percentage of a total with MSSQL
  • How to group items into a fixed number of bucket with MS SQL Server
  • How to group rows in fixed group size with MSSQL
  • How to number rows without using cursors with MS SQL Server
  • How to only display the first 2 rows of a group with MS SQL Server
  • How to pivot a summary into one row with MSSQL
  • How to rank rows by grouping without using cursors with SQL Server
  • MS SQL Server Groups vs. Distinct
  • Proper way of doing GROUP BY with MSSQL
  • Row count for all the tables in a database with MSSQL
  • What to do when not all items in select clause are in the Group By
  • Why are my averages wrong with MSSQL?

All contents in SQLHacks.com are the property of db Networks Ltd and it's affiliates. All other trademarks not owned by db Networks Ltd or its affiliates that appear on the SQLHacks.com site are the property of their respective owners, especially: Windows®, MS SQL®, SQL Server® which are the property of Microsoft Corp. DB2® which is the property of IBM Systems. Oracle database® which is the property of Oracle Corp.