SQL Query to return both distinct and total logins from a login table in sql2005
- by Prescott
Hey all,
I have a table Logins { Id, AccessTime }, I'd like to write a query that returns 3 columns, Total Logins during a time period, Unique Logins for a time period, and the Id of the user.
I know I could do this with two passes and a join, is there a better way to do it in a single pass?
Thanks,
~P