# Miscellaneous > Database Design >  how this query can be done in access...

## keep_learning

if I have a table of data like this in access :
MEMBER_ID	         ENROLLMENT_DATE	         DISENROLL_DATE	             Days
40000541	7/1/2007	     5/31/2008	 336
40000541	7/1/2008	     7/31/2008	 31

40001315	7/1/2007	    10/31/2007	123
40001315	11/1/2007   6/30/2008	243

40001353	2/1/2007	    2/28/2007	28
40001353	3/1/2007	   12/31/2008	67240001387	7/1/2007	   5/31/2008	336
40001387	7/1/2008	   7/31/2008	31

40004914	12/1/2007   1/31/2008	62
40004914	2/1/2008	    3/31/2008	60

How can I write a query in access that can combine the Member ID who have the second enrollment date is continuous followed the disenrolled_date (highlight in red), so that I can have only record for those members. Please help. Greatly appreciated.

----------


## Ignorant

See if this is of any help.... :Wink: 


```
SELECT *
FROM YOURTABLE AS a
WHERE (((Exists (SELECT 1 FROM YOURTABLE b 
                     WHERE b.MEMBER_ID = a.MEMBER_ID
      ))=False));
```

----------

