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到highest_bid的增長百分比。我認爲這或多或少是正確的,但數學並不完全是我的強項。找出最高出價比初始金額增加的百分比?
豈不是另一種方式周圍? 'MAX(BID_AMOUNT)/ item_reserve)'? – zimdanen
這不僅僅是一個簡單的數學問題嗎? –
這是數學,但確實需要在SQL上下文中完成 - 有些數學既不能完成,也很難在其中完成。 – Plasmarob