Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    60

    Unanswered: distinct on 2 columns

    How do I get number of rows(count) for distinct emp_id,emp_dept in table employee?

    Thanks,
    j

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: distinct on 2 columns

    I don't understand your query clearly ...

    With the best I can understand:

    with temp as
    (
    select distinct emp_id,emp_dept from employee
    )
    select count(*) from temp ;

    If this is not what you expect, can you give an example

    Cheers
    Sathyaram
    Originally posted by jfkuser
    How do I get number of rows(count) for distinct emp_id,emp_dept in table employee?

    Thanks,
    j
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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