b*****e 发帖数: 474 | 1 if different names have different ids, would this work:
select StockName, max(price)
from StockData
group by StockID, StockName
select D1.*
from StockData as D1, (select StockID, max(price)
from StockData group by StockID) as D2
where D1.StockID = D2.StockID
AND D1.price < ...
有 |
|
f*****g 发帖数: 15860 | 2 SELECT * FROM STOCKDATA S,
(select stockid, max(price)
from StockData
group by StockID) AS M
WHERE S.stockid = M.stockid
有 |
|
|
|
|
|
|
l*******n 发帖数: 219 | 8 看来上海国资企业整合是接下来的一个亮点。
http://www.datangcx.com/StockDetail.asp?StockID=14403
三大路径注资1800亿 上海国资整合大戏高潮到来
2009-06-27 15:01 来源:东方早报 阅读数:181次 文字选择:
6月8日,东航、上航重组宣布停牌。
6月18日,上海医药、上实医药、中西药业重组停牌。
6月22日,广电系的广电电子和广电信息通过了重组方案。
这一系列动作预示着上海国资整合的脚步在加快。
按照上海市市长韩正的说法,未来上海国资资产证券化的比例将从现有的18%提高到40%
左右。据东方证券测算,如果按照提高到40%的比例计算,即将注入上市公司的国有经
营性资产总量保守估计将达到1800亿左右。
东方早报国资整合大戏中,上海本地股里隐藏着一匹匹大黑马,理财一周报深度挖掘,
为您全线呈现。
理财一周报记者/林奇
三大整合思路消除“内耗”
4月8日,上海市委、市政府召开国资国企改革发展工作会议,确定了未来三至五年上海
国资国企改革发展的目标,将形成2-3家充分发挥投融资和国资流动平台功能的资本经
营公司;3-5家 |
|
|
s*****n 发帖数: 5488 | 10 public class stock
{
private string StockId;
private Quote bars[];
}
public class quote{
//define TOCHLV here
}
public class StockCache
{
Stock stock;
Quote[] bars = new Quotes[const int length];
// access method
public void AssignStock(Stock s ){this.stock = s};
public void ReplaceBar(Quote bar);
public void RemoveBar(DateTIme minute);
public bar GetBar(Datetime minute);
public void clear();
public void
//properties
public int BarCount
}
put monitor on stock obj, Quote class, and you should |
|
|
A*******y 发帖数: 11148 | 12 写了段SQL语法,数据库是很多股票月度performance
如果希望挑出每只股票价格最高的纪录的话,比如
select max(price)
from StockData
group by StockID
这样一来,如果我想加入其他字段,比如StockName,系统就会说即不在Group by又没有
aggregate。。。请问有什么解决办法吗?
还有,如果我想按照价格挑选所有字段,有什么办法不用手工输入所有字断名吗?
谢谢大家 |
|
a*******t 发帖数: 891 | 13 fryking's method should work, probably the correct way also.
but usually I just cheat and use
select max(stockName) as StockName, max(price) as MaxPrice
from StockData
where price is between 10 and 20 --your 2nd question
group by StockID
有 |
|