You can create your own queries using the
Query Designer under the Develop menu.
To quickly show the SQL Statement for a particular table, select the table name in the drop down and click the show sql link. This selected table will be used for the templates for the data that is returned. Click Run Query to show the results.
You can save your queries for use later. Specify the query to use by adding a &qid= parameter to the end of your querystring using the ID or the Name of the query you save. To keep your data secure, you must assign permissions to the query by group. When you first click the Save Query link, you will be presented with a list of Groups who you want to allow to view the Query Results. Click the view queries link to view, delete or modify existing queries.
The Query Designer will let you write ad hoc SQL statements against your database. You can run any statement you like, but we suggest using only SELECT statements to prevent damage to your database. If you are going to run statements to update your data, you should do a backup first, which is covered in Backing up your data