Using a Derived Table to Compare Data with Values from a Previous Year
Comparing year on year sales is a fundamental requirement in much commercial analysis - here you learn how to do this in SQL
2018-08-02
3,294 reads
Comparing year on year sales is a fundamental requirement in much commercial analysis - here you learn how to do this in SQL
2018-08-02
3,294 reads
2018-07-31
1,133 reads
DO you know how to display median values from a Dataset? In this short article you will use windowing functions to do this
2018-07-26
1,769 reads
2018-07-23
1,124 reads
T-SQL window functions, introduced in 2005 with enhancements in 2012, are great additions to the T-SQL language. In this article, Kathi Kellenberger explains what you need to know to get good performance when using these functions.
2018-07-16
4,197 reads
This short article shows a simple example of how to generate completely random sample output from a Dataset
2018-07-12
6,881 reads
This is the first article in a short series of SQL Server query challenges to test and expand your SQL Server querying skills
2018-07-05
20,216 reads
2018-07-03
1,134 reads
2018-06-04
1,119 reads
SSMS is a good management tool, but it’s not a good development tool. When you’re writing some simple queries, it’s fine. When you’re writing code with lots of branching, dynamic SQL, temp tables, error handling, and so on… Not so much. Here are some tips Erik darling has put together after a couple years of wrangling the Blitz scripts in the First Responder Kit.
2018-06-01
4,954 reads
Every organization I talk to has the same problem dressed up in different clothes....
By DataOnWheels
I am delighted to host this month’s T-SQL Tuesday invitation. If you are new...
By alevyinroc
Ten years (and a couple jobs) ago, I wrote about naming default constraints to...
Comments posted to this topic are about the item The day-to-day pressures of a...
Comments posted to this topic are about the item Using OPENJSON
Comments posted to this topic are about the item Data Modeling with dbt for...
I have some data in a table that looks like this:
BeerID BeerName brewer beerdescription 1 Becks Interbrew Beck's is a German-style pilsner beer 2 Fat Tire New Belgium Toasty malt, gentle sweetness, flash of fresh hop bitterness. 3 Mac n Jacks Mac & Jack's Brewery This beer erupts with a floral, hoppy taste 4 Alaskan Amber Alaskan Brewing Alaskan Brewing Amber Ale is an "alt" style beer 8 Kirin Kirin Brewing Kirin Ichiban is a Lager-type beerIf I run this, what is returned?
select t1.key
from openjson((select t.* FROM Beer AS t for json path)) t1 See possible answers