estimate user registration date by earliest transaction

bstamper

New member
Local time
Today, 15:43
Joined
May 7, 2008
Messages
3
We want to compare behavior of users who registered in the first quarter of this year with those who registered in the first quarter of last year.

Unfortunately, the 'users' table does not have a field for registration date. There is a 'transactions' table with transaction dates, linked to users via username.

The earliest transaction for a given user should be a reasonable indicator of registration date. So, I want a make table query that outputs a list of users, that for each user their *earliest* TransactionDate falls between two given dates. This is a bit beyond my novice SQL skills, so I ask you; is this possible?

Thank you very much,

Brian Stamper
The Ohio State University
Interlibrary Services
 
The below might suffice:
SELECT Users.UserName, Min(Transactions.TransactionDate)
INTO NewTable
FROM Users INNER JOIN Transactions ON Users.UserName=Transactions.UserName
GROUP BY Users.UserName
HAVING Min(Transactions.TransactionDate) Between [1st date] AND [2nd Date]
 
That did the trick, thank you very much!
 

Users who are viewing this thread

Back
Top Bottom