As usual, the "Add New" button leads to the creation form. It has two main fields:
- NameSQL query name. Make the name as long and descriptive as necessary.
- RequestSQL query. The SQL query itself. You are free to perform JOINs or other intricate selections.
Additionally, the "List of MySQL Tables" section helps you explore the database, and makes it easier for you to build your queries. It gives you a handy and clickable selector of all the currently available database tables. Select a table to make PrestaShop display its attributes and types, then click "Add attribute to SQL query" to send its name into the "Request" field.
Saving the form sends you back to the main page, with its list of queries.