Ver originalSELECT ROUND( SUM( a.price * a.amount ), 2) AS total FROM ordered_product a INNER JOIN orders o ON o.Id = a.order WHERE o.User = '1' AND DATE_SUB( CURDATE() , INTERVAL 30 DAY ) <= o.fecha