Results 1 to 3 of 3

Thread: Help with query

  1. #1
    Join Date
    Mar 2009
    Posts
    2

    Help with query

    Suppose I have the following table:

    TABLE_NAME
    ID
    TEAM_NAME
    LEAGUE_NAME
    DIVISION_NAME
    RECORD

    I need the result of my query to return only those records that share the same TEAM_NAME.

    Still a noob with all this, so any help would be great!

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    select * from table1
    where team_name in (select team_name from table1 group by team_name having count(*)>1)

  3. #3
    Join Date
    Mar 2009
    Posts
    2
    Thank you!

Posting Permissions

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