Selecting multiple rows by given amount of volume i have a table like this

+--------+------------+-----------+
| id     | volume     | price     |
+--------+------------+-----------+
|      1 | 1.0000     |  14250.00 |
|      2 | 0.2500     |  14251.10 |
|      3 | 0.2500     |  14250.00 |
|      4 | 0.0050     |  14200.00 |
|      5 | 0.5000     |  14255.01 |
+--------+------------+-----------+


Simply if volume 1.7500, how to select like bellow by ordering(highest price)

+--------+------------+-----------+
| id     | volume     | price     |
+--------+------------+-----------+
|      5 | 0.5000     |  14255.01 |
|      2 | 0.2500     |  14251.10 |
|      1 | 1.0000     |  14250.00 |
+--------+------------+-----------+


And if volume 1.5000 it also select the least amounts of records needed to calculate to the input volume

+--------+------------+-----------+
| id     | volume     | price     |
+--------+------------+-----------+
|      5 | 0.5000     |  14255.01 |
|      1 | 1.0000     |  14250.00 |
+--------+------------+-----------+


some guys say i cant do this with sql
You would need to use a reduction method to slowly calculate the parts that make up the target volume. For instance 1.75, you would as you say be 1.00, then 0.5 then 0.25. You can use a loop to calculate the remainder using modulus, then use that remainder to find the next largest volume less than or equal to your value. 

This is how I would do it (there might be better ways but this works)

CREATE TABLE VolumePrice (
    id int not null,
    volume decimal(9,4) not null,
    price decimal(9,2) not null
);

insert VolumePrice (id, volume, price)
values (1, 1.0000, 14250.00),
       (2,0.2500,14251.10),
       (3,0.2500,14250.00),
       (4,0.0050,14200.00),
       (5,0.5000,14255.01);

-- create a temp table to hold the output
create table output (
    id int auto_increment not null primary key, 
    remainder decimal(9,2), 
    volume decimal(9,2)
);

DELIMITER //

create procedure do_insert()
begin
set @v = 1.75;
set @remainder = @v;

while @remainder &gt; 0
do
    insert output(remainder, volume)
    select @remainder % max(volume)
         , max(volume) as volume
      from volumeprice
     where volume &lt;= @remainder;

  set @remainder = (select remainder 
                      from output 
                  order by id desc
                     limit 1);
end while;
end;
//

DELIMITER ;    

CALL do_insert();

select v.*
  from output as o
  join (select volume, max(price) as max_price
          from volumeprice
      group by volume) as vp on vp.volume = o.volume
  -- I only link back to the volumeprice table here to obtain the id, 
  -- if you do't need the id you can remove this part and just select vp.* instead...
  join volumeprice as v 
    on v.volume = vp.volume 
   and v.price = vp.max_price;


And here is a SQL Fiddle that seems to do the trick.