Results 1 to 2 of 2

Thread: Query

  1. #1
    Join Date
    Mar 2004
    Posts
    1

    Query

    Hi,

    I need to write a query here is the data to be retrived

    There is a data base table of Employees having fields firstname,lastname and all the other details.

    i have to retrive the all the firstnames of all the employees in alphabetical order and the number of times the first name repeats.

    for example

    Bobe is the first name repeats three times.

    i should get Bobe 3

  2. #2
    Join Date
    Mar 2003
    Location
    Woking, UK
    Posts
    152
    select firstname , count(*) as duplication
    from Employees
    group by firstname
    You Have To Be Happy With What You Have To Be Happy With (KC)

Posting Permissions

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