S3OLV update and Reminder
We are now just a few days away from our first meeting of 2012. We have some good content lined...
2012-01-09
636 reads
We are now just a few days away from our first meeting of 2012. We have some good content lined...
2012-01-09
636 reads
SQL Server Books online defines the wait type WRITELOG as “Occurs while waiting for a log flush to complete. Common...
2012-01-09
1,259 reads
When building a data warehouse, it is important that primary keys of dimension tables remain stable. To accomplish this, it...
2012-01-09
3,954 reads
Many of you have first hand experience of our phenomenal sql community (affectionately labelled the #sqlfamily).
Your first encounter with it...
2012-01-09
596 reads
Global temporary table:- Global temporary table is created in the tempdb and it is visible to all other sessions as well. Global...
2012-01-07
48,375 reads
Local temporary table:- Local temporary table is created in the tempdb and it is visible to the current user's session...
2012-01-07
8,708 reads
Table variable:- SQL Server provides an variable known as table variable which is used to store data in a similar way as we...
2012-01-07
9,402 reads
Unfortunately some of the more troubling bugs can be very hard to reproduce succinctly. Here is one that has been...
2012-01-06
1,360 reads
It was a day of warm weather, it was a day of cold weather. A tale of two cities on...
2012-01-06
2,040 reads
I was reading this article about internet usage by staff who work for local authorities in Wales http://www.bbc.co.uk/news/uk-wales-16394916 The content...
2012-01-06
942 reads
I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...
By Steve Jones
I looked at row_number() in a previous post. Now I want to build on...
Recently I received a cry for help over Teams. The issue was that an...
Hi - I'm looking for advice regarding the best & quickest way to establish...
Hello. I am looking for a tool Data cleansing/conversion, was recommended HPE any...
I have a query that runs in a job to check on orphaned users....
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