Metadata Manager
- Metadata Manager 10.5
- All Products
SELECT AVG(price - cost) AS profit FROM products JOIN order_details ON (order_details.prod_id = products.prod_id) JOIN orders ON (order_details.order_id = orders.order_id) WHERE YEAR(order_date) = 2014 AND MONTH(order_date) = 12 AND price >= 500