Results 1 to 6 of 6

Thread: count(*) for Per-Group

  1. #1
    Join Date
    Jul 2003
    Posts
    421

    count(*) for Per-Group

    I need to cross join on three tables, and need to found the count(*) for per Croup and the total number for all group , what menthod I can use ,
    Thank you!
    ________
    Daihatsu
    Last edited by sql; 03-06-2011 at 02:14 AM.

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932

  3. #3
    Join Date
    Jul 2003
    Posts
    421
    is that possible to group by InterviewDate and the InterviewDate
    may be 'yyyy-mm-dd' ( default) or any date the formats like '2010-01-26 '
    thank you!
    ________
    LAMBORGHINI LM003 HISTORY
    Last edited by sql; 03-06-2011 at 02:15 AM.

  4. #4
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    You can, use

    GROUP BY CONVERT(interviewdate,char(10),105)

    This will group by dd-mm-yyyy

  5. #5
    Join Date
    Jul 2003
    Posts
    421
    I want to count for all , also want the count for those interview is not yyyy-mm-dd(actually have date in the column) is that possible too?
    Thank you
    ________
    Bmw X
    Last edited by sql; 03-06-2011 at 02:15 AM.

  6. #6
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    I am not clear on what you are trying to get. Can you post sample data and result you want. You can't get two types of count with one statement.

Posting Permissions

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