Results 1 to 3 of 3

Thread: COUNT for MAX

  1. #1
    Join Date
    Dec 2005
    Posts
    266

    Unanswered: COUNT for MAX

    for access 2000

    the following SELECT works

    SELECT TB1.A, Max(TB1.B) AS B FROM TB1 GROUP BY TB1.A, TB1.C HAVING TB1.C > 100


    my problem : I dont need TB.A , but COUNT(TB.A) AS A

    if i run


    SELECT COUNT(TB.A) AS A, Max(TB1.B) AS B FROM TB1 GROUP BY TB1.A, TB1.C HAVING TB1.C > 100


    it doesnt work
    I need 2 columns
    COUNT(TB1.A) | DISTINCT(TB1.B)

    thank you for helping

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Code:
    select Count(tb.a) As A, Tb1.b As B From Where Tb1.c > 100 Group By Tb1.b
    ???
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Dec 2005
    Posts
    266
    I got it with a distinct(TB1.B)

    thank you

Posting Permissions

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