SQL Index Fragmentation and sys.dm_db_index_physical_stats
Fragmentation of an index can severely affect performance. When logical ordering of the key within a page does not match...
2012-01-02
992 reads
Fragmentation of an index can severely affect performance. When logical ordering of the key within a page does not match...
2012-01-02
992 reads
SELECT 'Happy '+ DATENAME(dw, GETDATE())Welcome to the penultimate installment of SQL Server A to Z (it’s not often I get to...
2012-01-02 (first published: 2011-12-26)
2,282 reads
Goal Setting
Last year, I did a wrap up post of the year to see where I landed from where I...
2012-01-02
982 reads
Blimey, doesn’t seem like a year since I wrote my last end of year review End of year review 2010...
2012-01-01
674 reads
Today is the first day of 2012 and some commentators and bloggers in the SQL Server blog space use this...
2012-01-01
1,078 reads
I received my fourth (or fifth?) renewal notice as a Microsoft MVP this morning. I am proud to be recognized...
2012-01-01
928 reads
What is a role of a DBA in an organization?What are the daily activities of a DBA?What shall I check...
2012-01-01
734 reads
It’s the first day of 2012. Setting New Year Resolutions is often a futile activity – and resolutions I’ve set in...
2012-01-01
389 reads
2011-12-31
Like a lot of people within the SQL community, I can never read enough on the subject. Books, whitepapers, academic...
2011-12-31
2,302 reads
By davebem
I was the principal author of this SIOS whitepaper, which describes how to build...
By Brian Kelley
I am able to head back to Seattle for the PASS Summit this year....
By Brian Kelley
I still have a tendency to talk about all the cons of a proposed...
Comments posted to this topic are about the item The Cloud Security Problem
Comments posted to this topic are about the item Virtualizing AWS data by using...
Comments posted to this topic are about the item Timescale Brings PostgreSQL into the...
I have this data in a SQL Server 2022 table:
player yearid team HR Alex Rodriguez 2012 NYY 18 Alex Rodriguez 2013 NYY 7 Alex Rodriguez 2014 NYY NULL Alex Rodriguez 2015 NYY 12 Alex Rodriguez 2016 NYY 9If I run this code, what are the results returned in the hrgrowth column?
SELECT player , yearid , hr , hr - LAG (hr, 1, 0) IGNORE NULLS OVER (ORDER BY yearid) AS hrgrowth FROM dbo.playerstats;See possible answers