To create a query, you can use the Open Query File (OPNQRYF) command. Alternatively, you can create a query using the Run SQL Scripts window in iSeries™ Navigator.