TestName vs. RunDate

Results 1 to 2 of 2

Thread: TestName vs. RunDate

  1. #1
    Join Date
    Dec 1969

    Default TestName vs. RunDate

    I have a database that has a bunch of test names and the dates that they were run. This is a running databse so there are a lot of entries of the same test, but with different dates. I've been asked to create a query that will return each test and the most recent time they were run, but I'm lost as to how to do this!

  2. #2
    Join Date
    Dec 1969

    Default RE: TestName vs. RunDate

    SELECT TestName, Max(RunDate) AS MostRecent <BR>FROM table<BR>GROUP BY TestName<BR>ORDER BY TestName<BR><BR>(or ORDER BY Max(RunDate), as you choose)<BR><BR>This assumes, of course, that the TestName values are *exact* copies of each other when they are run on different dates. If the names differ even in the number of spaces in the name, they will be seen as a different "group" by the GROUP BY clause.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts