BAQ for distinct entries

I am looking to write a BAQ that will return the distinct records.

Specifically I am looking at the MemoCat table and would like to have a query return the distinct records in MemoCat.CategoryID.

In sql this would be a SELECT DISTINCT query.

Any suggestions for how to generate this list?