Order tables relationship

The 1.6 version of Magento has a total of some 250 tables, finding information is quite complicated, which is why we can get through mageverse table relationships.

With regard to information of all orders, the main table is sales_flat_order and their relationships are:

sales_flat_order

For example if we want to show all guests orders, showing the store where the order was made, if used a coupon, the total paid and the customer data sorted by email, the SQL would be:

SELECT store_name, 
       coupon_code, 
       total_paid, 
       order_currency_code, 
       customer_email, 
       customer_firstname, 
       customer_lastname, 
       created_at
FROM sales_flat_order
WHERE state =  'complete'
AND customer_is_guest =1
ORDER BY customer_email