www.webdeveloper.com
Results 1 to 2 of 2

Thread: Odd Query Request (tough one)

  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Odd Query Request (tough one)

    I have a table (Excel sheet, whatever...) containing PeopleSoft login information with three columns: Login Time, Logout Time, Time Spent.

    My manager has been asked to use that to provide a minute by minute run down of concurrent logins for the entire data set (day).

    So, the SELECT for the table is like so:

    SELECT LOGIN.Login, LOGIN.[Log out], LOGIN.[Time in]
    FROM LOGIN;

    Output looks like this:

    Login Log out Time in
    11/1/10 12:36 AM 11/1/10 12:42 AM 0:06
    ...

    What I need is:

    Time Concurrent_Logins
    11/1/10 12:36 AM 16
    ...

    So, this is quite complicated. Any thoughts?

  2. #2
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287
    Not sure what db your using by in MySQL you would do this:

    Code:
    SELECT count(*) as total, login_time from LOGIN group by login_time;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles