I need to generate the following with an SQL statement in magento database.But i do not exactly know, where the tables and the fields are?
Order number, SKU, Item name, Quantity, Item price, Total Line price, Cost of each item(I don’t know whether this is a custom attribute or not), Total Line Cost, Order Total Cost, Shipping, Order Total Price
Take a look at
or you could load the order and get all the info (also some of the order info are store in the db as php serialize array)