Modify a Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using the following. It produces the result I need.

SELECT Min([ID]) AS TheID, [Date], [Time], [UnderlyingSymbol]
FROM BTA_Trades_PIPs
GROUP BY [Date], [Time], [UnderlyingSymbol];

I have some other fields (Field1,Field2 etc) and would like them to be
displayed but do not want the result of the query to be altered from the
original.

Is it possible ?

Thank you in advance
 
If you just want one of the values returned from the additional fields which
match up with your group of date, time, and symbol, use the FIRST aggregate

SELECT Min([ID]) AS TheID, [Date], [Time], [UnderlyingSymbol], First(Field1)
as Fld1, First(Field2) as Fld2
FROM BTA_Trades_PIPs
GROUP BY [Date], [Time], [UnderlyingSymbol];
 
Back
Top