I have a table that looks like this:
Barcod | PRICE | Start date 007023819815 | 15,9 000 2008-11-17 00: 00: 00.000 007023819815 | 319000 | 2009-02-01 00: 00: 00.000
How do I select so that I can get results like this:
Barcode | PRICE | Start date 007023819815 | 319000 | Select by using Maximum Date . Thanks in advance.
/ div>
top 1 barcode, start with the value, start date in the table by the DESC
or if more than one rows can be
SELECT barcode, value, by the name of the tag A start date with a WHERE startdate = (SELECT MAX (startdate) TableName B WHERE B.barcode = Abarcode)
UPDATE Another query to see the maximum value per barcode Has changed.
Comments
Post a Comment