How to get monthly YTD data
This article presents an easy method to get YTD data grouped by months in T-SQL.
This article presents an easy method to get YTD data grouped by months in T-SQL.
There are lots of things to think about when you design a physical database. What data types should I use? What column is appropriate for the primary key? Are there particular indexes that I should use to improve performance? How should I implement data integrity rules? This list goes on and on. In this article Greg Larsen will be exploring different physical database design elements.
There should be some method to your madness when fixing code. At least, that's what Linus Torvalds thinks and Steve Jones agrees.
Databases are unique in IT that they are singularly resistant to 'best practice' advice. Any such advice can never be anything other than a starting position for tests in your own environment.
The challenge is to create a query for a report that show expiring material
Step-by-step instructions how to build a stored procedure that dynamically constructs and executes a merge statement within SSIS.
In this next article in our series where well-known SQL Server people write about their favorite SQL Server Howlers, we asked Tom Larock for his top five common misunderstandings about how SQL Server works that end in tears, and plaintive forum questions.
A detailed look the B-Tree structure – Leaf level and non-leaf level.
Do sub query expressions introduce a performance penalty on retrieving large data sets?
By Steve Jones
I type fairly well. Well, I type fast, but I do wear out a...
By ReviewMyDB
Index maintenance has always meant nightly jobs and a window you have to defend....
I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Comments posted to this topic are about the item How We Handled a Vendor...
Comments posted to this topic are about the item Cognitive Coverage
I have this data in the dbo.Commission table in a SQL Server 2022 database.
salesperson commission Brian 12 Brian 16 Andy 7 Andy 14 Andy 21 Steve 20 Steve NULLAll the data is a varchar, and I decide to run this query to get the totals for each salesperson.
SELECT SalesPerson
, AVG(TRY_PARSE(Commission AS int)) AS TotalCommission
FROM commission
GROUP BY SalesPerson
GO
What average commission is calculated for Steve? See possible answers