I have a table named sales
and it has 2 columns: Sales_Id
and Price
. I need to retrieve the cheapest price from the table. The cheapest price is 100. However, it shows only for one Sales_ID
whereas I want it to return all 3 entries with the cheapest price.
Create table sales
(
Sales_Id int Primary Key,
Price number(4)
);
insert into sales values( 1,100);
insert into sales values( 2,400);
insert into sales values( 3,100);
insert into sales values( 4,100);