Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 YTD Median Price - including history
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

38 Posts

Posted - 08/27/2014 :  16:24:00  Show Profile  Reply with Quote

We have a DB full of real estate sold data going back to 1990, and it includes the following fields:


I need to use it to fill a YTDMEDIAN table with the following fields:


I need to calculate the history going back to 1990, and having it grouped by where the community is located in as well. Each month would be a year to date for the month. I can't think of any way to automate this unfortunately.... I've been able to figure out grouping monthly totals, but the YTD (and median) is throwing me for a loop. Any tips or suggestions?


Flowing Fount of Yak Knowledge

2780 Posts

Posted - 08/27/2014 :  20:09:24  Show Profile  Reply with Quote
post some sample data and expected output
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000