sql >> Base de Datos >  >> RDS >> Mysql

Cómo seleccionar un valor mínimo único de más tablas

Aquí hay una opción con una union all declaración:

select idoffer, min(price)
from (
    select idoffer, price from tablea
    union all
    select idoffer, price from tableb
) t
group by idoffer