使用Sum()和Group by子句从数据集表中执行Select查询语法

时间:2017-07-27 16:53:42

标签: c# sql .net

有没有办法查询数据集表?

我试图将其应用于数据集表,但我没有语法

SELECT [In], F2, [Out], F5, SUM(Hours) 
FROM Table1
WHERE (F2 = (SELECT TOP 1 FROM Table1 ORDER BY ASC)
  AND F5 = (SELECT TOP 1 FROM Table1 ORDER BY DESC))
GROUP BY IN, OUT;

0 个答案:

没有答案