To run the stockHistory queries, create a database called Indexes and run the StockHistory table.sql script. If you use a different database name, be sure to modify the USE Indexes lines in the code.sql script.

If you wish to install the median CLR function, place the median.dll at this path: C:\CLR\. I am including the code to create the dll in the PASSCLR folder. I originally presented this at the PASS Summit in 2014. 

Download the OLTP version of AdventureWorks for 2012, 2014, or 2016 from
http://msftdbprodsamples.codeplex.com/

 