need newest date also

  • Hi, I used this to pull out a count of number of times an item is in a table along with the items name. Now they want the date of the most recent entry, but it alludes me how to incorprate that into my existing statement. If nothing else, I could use output from this to requery for just the date, but that seems awfully wasteful.

    Select Count(*) as Icnt,Item From Log Group By Item Order By Item

    Any other thoughts?

    Thanks,

    Patrick

  • You might try

    select count(1) icnt, item, max(datecolumn) from Log group by item order by item

    --Paul Hunter

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply