Select max(date),Product,stage from liststage group by product,stage
SELECT Date, Product,stage FROM liststage WHERE Date = (SELECT MAX(Date) FROM liststage) --OR SELECT TOP 1 Date, Product,stage FROM liststage ORDER BY Date DESC
SELECT MAX(CAST([date] AS DATETIME)) AS MaxDate, Product, stage FROM liststage GROUP BY product, stage ORDER BY MAX(CAST([date] AS DATETIME)) DESC
SELECT [Product], MAX([date]), MAX([stage]) FROM liststage ORDER BY [product] GROUP BY [product]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)