Ver originalselect *from registro_compra wherecod_producto = 123 and fecha_emisionbetween str_to_date('01/01/2009','%d/%m/%Y') andstr_to_date('31/12/2009','%d/%m/%Y');