Quantcast
Viewing all articles
Browse latest Browse all 13329

Group qry MEDIANS on two fields

tblHistorical2012
Fields in table
City text
ClosingDate Date: Format([ClosingDate],'yyyy')
ClosePrice Currrency
BuildingSize LongInteger

Records in Table (478,795)

I need to calculate the MEDIAN of [ClosePrice] and
[buildingSize] for each city for years 1998 through 2012

GroupBy City and Year

The query would display as below:

City ClosingYear MedianPrice MedianSize
Aliso Viejo 1999 214500 1381
Aliso Viejo 2000 242250 1400
Aliso Viejo 2001 276000 1402
Aliso Viejo 2002 324000 1436
Aliso Viejo 2003 380000 1428
Aliso Viejo 2004 500000 1400
Aliso Viejo 2005 539000 1400
Aliso Viejo 2006 548000 1400
Aliso Viejo 2007 524900 1436
Aliso Viejo 2008 431000 1400
Aliso Viejo 2009 395000 1400
Aliso Viejo 2010 380000 1389
Aliso Viejo 2011 353892 1401

Once the query runs I would like to Export the results as displayed to Excel (2010) to run another set of percent calculations.

I've seen a few examples for group median queries in a Google search (see below link)but can't quite understand what it all means.

ACC2000: Reporting the Median Value of a Group of Records

Thanks . . .

Rick

Viewing all articles
Browse latest Browse all 13329

Trending Articles