To give some further distinction, "if" your system has the STRQM command
you may wish to use that to build your queries.
It allows you to create queries using a prompting method similar to
you can create queries using sql syntax thereby fully opening up to you
items like distinct, etc.
The STRQM command is part of 57##ST1 - IBM DB2 Query Manager and SQL
Development Kit for i