Results 1 to 2 of 2

Thread: Help!

  1. #1
    Join Date
    Jun 2004
    Posts
    1

    Unanswered: Help!

    Hi, I have a rather simple yet frustrating SQL question.

    I have a table called tb_accounts, anyway I'd like to retrieve all account_ids that have more then 1 client_id - it's been frustrating me. Hope anyone can help!

    Thanks!

    Rob

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    select account_id
    from tb_accounts
    group by account_id
    having count(client_id) > 1;

Posting Permissions

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