Below was my query:
select p1.* from price_temp p1 inner join (select p2.id, p2.program_id, MIN(p2.price) min_price from price_temp p2 right outer joi