Results 1 to 3 of 3

Thread: SQL Query Help

  1. #1
    Join Date
    Mar 2007
    Posts
    212

    Unanswered: SQL Query Help

    Hi,

    I have a table called tbl_users.
    Code:
    Id | Name         | Date_Registered      | Company_Name
    ____________________________________________________
    1  | name_x       | 2011-02-01 16:44:17  | company_1
    2  | name_y       | 2011-02-02 15:34:17  | company_2
    3  | name_z       | 2011-02-02 15:34:17  | company_1

    How do I select only those users that registered first from each company?

    so the from the above table only users 1 and 2 should be retreived.

  2. #2
    Join Date
    Mar 2007
    Posts
    212
    I've found my solution on the following thread.

    http://www.dbforums.com/mysql/166410...ered-date.html

    Thanks r937!

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by ozzii View Post
    Thanks r937!
    hey, you're welcome
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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