Results 1 to 3 of 3

Thread: Repeated Data

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    2

    Repeated Data

    table:dept
    field: department
    values: sales
    sales
    marketing
    reporting
    revenue
    revenue

    how to get only the repeated data from the table


  2. #2
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Repeated Data

    Quote Originally Posted by rahul.kgupta79 View Post
    table:dept field: department values: sales sales marketing reporting revenue revenue how to get only the repeated data from the table
    select department from dept where rowid in (select min(rowid) from dept group by department);


  3. #3
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: Repeated Data

    Quote Originally Posted by rahul.kgupta79 View Post
    table:dept
    field: department
    values: sales
    sales
    marketing
    reporting
    revenue
    revenue

    how to get only the repeated data from the table
    Try this
    select distinct department from dept where department in (select department from dept having count(*)>1 group by department)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact