1
select top 7 item_name, item_reserve, count(bid_id) as bid_count, 
max(bid_amount) as highest_bid, 
item_reserve / max(bid_amount) * 100 as pct_increase
from vb_items
join vb_bids on item_id=bid_item_id
where item_sold = 0 
group by item_name, item_reserve
order by bid_count desc

我想找到从 item_reserve 到最高出价的百分比增加。我认为这或多或少是正确的,但数学并不是我的强项。

4

1 回答 1

0

从 item_reserve 到 high_bid 的百分比增加为:

( (highest_bid / item_reserve) - 1 ) * 100.

例如,如果它们分别是 100 和 110,那么您有

((110/100)-1)*100 = (1.1 - 1) * 100 = a 10% increase.
于 2013-10-04T17:24:56.423 回答