query+date order

  • Thread starter Thread starter J.J.
  • Start date Start date
J

J.J.

Hi
i need a function that orders the dates in one column from min to max and
then in another column the first date gets the number 1, second =>2, third
=> 3...and so on.
any suggestions
many thanks
J.J.
 
Hi,



SELECT a.pk, LAST(a.DateTime), COUNT(*) As rank
FROM myTable As a INNER JOIN myTable As b
ON b.DateTime <= a.DateTime
GROUP a.pk


where pk is the primary key field of the table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top