S
Smartin
/Preamble/
Dear Reader,
There have been many times I have started to write out a problem that
has me stumped, only to find that as I write the solution magically
materializes. Sometimes before I can finish my thoughts I have solved
the problem, and I cancel my message. If I end up pressing "send" on
this message, Dear Reader, please do not think I did so hastily. The
collective knowledge and helpfulness in this group has been nothing
short of amazing, and is highly prized. Kudos to you all.
/The Problem/
Given the following table
TAT_DATA
=========
PK
LOB
SOURCE
BNK
REPRICED
PROC_MONTH
JURIS
LAGTIME
I need to return all columns without aggregation, but filtered to return
the TOP 95 PERCENT of rows relative to LAGTIME (ORDERed BY ASC) within
each LOB and PROC_MONTH pair.
A little bit about the data and what I'm doing:
LOB can be one of three distinct values.
PROC_MONTH is a date column representing a month. Each month we will add
more rows to the table representing the previous month's activity.
Defining a list of possible values here is possible, but not desirable
from a maintenance standpoint. Each PROC_MONTH adds some 80K rows on
average to the table.
LAGTIME is a integer (in the mathematical sense). I want to return the
top 95% of these when ordered ascending (so as to discard the "worst"
5%). Additionally, there are a few outliers I need to exclude before the
TOP calculation is applied. I assume this will happen in a WHERE clause,
e.g.,
WHERE LAGTIME >=0 AND LAGTIME < 1000
I cannot deliver aggregated data because the detail is needed in further
analysis for which requirements vary. Various individuals will be
examining averages, counts and deviations by SOURCE, BNK, JURIS,
REPRICED etc., but always(?) within an LOB and PROC_MONTH. An Excel
Pivot table is supplied to the end-users for this step, no worries
there. I just need to supply the filtered detail as a data source.
The production platforms are A97 and E97.
*However* if you would like real data to play with I have created an
anonymized, 1001 row sample mdb in A2002 format (zipped to 36K) and made
it available here:
http://vfdrake.home.comcast.net/files/TAT2002.zip
Thanks, as always, for any suggestions you may have.
Dear Reader,
There have been many times I have started to write out a problem that
has me stumped, only to find that as I write the solution magically
materializes. Sometimes before I can finish my thoughts I have solved
the problem, and I cancel my message. If I end up pressing "send" on
this message, Dear Reader, please do not think I did so hastily. The
collective knowledge and helpfulness in this group has been nothing
short of amazing, and is highly prized. Kudos to you all.
/The Problem/
Given the following table
TAT_DATA
=========
PK
LOB
SOURCE
BNK
REPRICED
PROC_MONTH
JURIS
LAGTIME
I need to return all columns without aggregation, but filtered to return
the TOP 95 PERCENT of rows relative to LAGTIME (ORDERed BY ASC) within
each LOB and PROC_MONTH pair.
A little bit about the data and what I'm doing:
LOB can be one of three distinct values.
PROC_MONTH is a date column representing a month. Each month we will add
more rows to the table representing the previous month's activity.
Defining a list of possible values here is possible, but not desirable
from a maintenance standpoint. Each PROC_MONTH adds some 80K rows on
average to the table.
LAGTIME is a integer (in the mathematical sense). I want to return the
top 95% of these when ordered ascending (so as to discard the "worst"
5%). Additionally, there are a few outliers I need to exclude before the
TOP calculation is applied. I assume this will happen in a WHERE clause,
e.g.,
WHERE LAGTIME >=0 AND LAGTIME < 1000
I cannot deliver aggregated data because the detail is needed in further
analysis for which requirements vary. Various individuals will be
examining averages, counts and deviations by SOURCE, BNK, JURIS,
REPRICED etc., but always(?) within an LOB and PROC_MONTH. An Excel
Pivot table is supplied to the end-users for this step, no worries
there. I just need to supply the filtered detail as a data source.
The production platforms are A97 and E97.
*However* if you would like real data to play with I have created an
anonymized, 1001 row sample mdb in A2002 format (zipped to 36K) and made
it available here:
http://vfdrake.home.comcast.net/files/TAT2002.zip
Thanks, as always, for any suggestions you may have.