I have the following SQL statement
SELECT [Motor]
,[Time]
FROM [logger].[dbo].[motor]
WHERE day([Time]) = day(getdate())
ORDER BY [TIME]
This is a very basic table that gives me the status of a motor at a given time.
All I want is a select statement that will give me the latest result if possible. I can get it so it gives all of today’s results but if I could get it so that it only displays the latest result that would be great.
1 Answer