Your data example appears to show, for your query steps, the resulting output file will have each unique CUSTOMER_ID, sorted by the DATE (variable / column) in descending order,and output variables CUSTOMER_ID, EVENT and DATE.
Hi:
In addition to Scott's comments, it also looks like your criteria for selection might have something to do either with EVENT or DATE -- what your desire output has in common is that the EVENT for both rows is equal to 'B' and the date for both rows is equal to 20050403.
You are the person who is most familiar with your data. The query that you build will need to use a filter to select the rows that you want. When you build the filter, you have to decide which criteria will get you the rows you want. For example:
Option 1: Filter and Select ALL the rows where event = 'B' and date = '20050403'
OR
Option 2: Filter and Select ALL the rows where event = 'B' (could get ANY date)
OR
Option 3: Filter and Select ALL the rows where date = '20050403' (could get ANY event code)
OR
Option 4: Filter and Select the rows where event = 'B' or date = '20050403'
If you want to solve this in Filter and query, you need to create a computed column (max(date)), group by customer_id, and then subset via having (data = maxdate).