select CURRENCY.currencyname, currency.currencysymbol, COUNTRYNAME.currencycode,
currency.exchangerate
from CURRENCY,COUNTRYNAME
where currency.currencycode=COUNTRYNAME.currencycode
having currency.exchangerate >= max(currency.exchangerate)
group by CURRENCY.currencyname, currency.currencysymbol,
COUNTRYNAME.currencycode, currency.exchangerate;
這是我得到的輸出,我知道是錯誤的,因爲我試圖只顯示最大的匯率將是。所以任何幫助解決這個查詢將非常感激。我的Oracle SQL Developer錯誤的查詢輸出時使用where和具有相同的SQL語句
CURRENCYNAME CURRENCYSYMBOL CURRENCYCODE EXCHANGERATE
-------------------- -------------------- ------------ ------------
British Pound £ GBP 1,
US Dollar $ USD 1.9626 ,
Danish Krone kr DKK 9.9918 ,
Malaysian Ringgit RM MYR 6.35392 ,
Euro € EUR 1.34076 ,
Indian Rupee Rs INR 77.3265 ,
Japanese Yen ¥ JPY 209.881,
什麼是你應該做的? – 2013-04-20 10:55:36
與_trying顯示_它正在做什麼它在選擇.. – dbf 2013-04-20 10:56:17
選擇'max(currency.exchangerate)'怎麼樣? – 2013-04-20 11:01:35