dustyteter
MIS
- Mar 5, 2004
- 11
Here is my scenario
1 BUSINESS_ID can have multiple associated LICENSE_ID's. Both of these identifiers live in the same table as well as the CLOSURE_DT for each LICENSE_ID.
DATA EXAMPLE
BUS_ID LIC_CNTRL_ID LIC_CLSD_DATE
7 12165 04/05/1989
7 20494 09/30/1993
7 84565
14 40117 08/31/1995
14 42841 11/21/1996
what I need is to return bus_id's that would be considered closed due to the fact that all associated LIC_CNTRL_ID's have a LIC_CLSD_DATE
In the example above I would only return BUS_ID '14'
I also need to select the LIC_CNTRL_ID with the most recent LIC_CLSD_DATE
Does this make any sense?
Thanks for any help!!
1 BUSINESS_ID can have multiple associated LICENSE_ID's. Both of these identifiers live in the same table as well as the CLOSURE_DT for each LICENSE_ID.
DATA EXAMPLE
BUS_ID LIC_CNTRL_ID LIC_CLSD_DATE
7 12165 04/05/1989
7 20494 09/30/1993
7 84565
14 40117 08/31/1995
14 42841 11/21/1996
what I need is to return bus_id's that would be considered closed due to the fact that all associated LIC_CNTRL_ID's have a LIC_CLSD_DATE
In the example above I would only return BUS_ID '14'
I also need to select the LIC_CNTRL_ID with the most recent LIC_CLSD_DATE
Does this make any sense?
Thanks for any help!!