Say I have the following data
Name Value
===============
Small 10
Medium 100
Large 1000
Imagine that these represent the
This works. Replace the "5" with your parameter.
select min(basket_value) as basket_value
from baskets
where basket_value > 5
or basket_value = (select max(basket_value) from baskets)
Simple script to generate test data:
create table baskets(
basket_name varchar2(20)
,basket_value number
);
insert into baskets(basket_name,basket_value) values('Small',10);
insert into baskets(basket_name,basket_value) values('Medium',100);
insert into baskets(basket_name,basket_value) values('Large',1000);
commit;
--drop table baskets; --run when finished