Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Posts
    157

    Unanswered: first sum the multiples, then count (was "Query Help")

    Hi: When i run the query it returns count 4 but actually they are 5 because "10521678" Debtor_ID has two records (I mean multiple). My question is how to i first sum the Cur_Bal of those Debtor_ID which are multiple in the table and then count.

    Thanks.

    SELECT count(*)
    FROM tbl_DistList_DEP_Duplicate WHERE (Clt_ID = 'CERT02') AND (Cur_BAl BETWEEN 1000 AND 1999.99) 'return 4


    Clt_ID Cur_Bal List_Date Debtor_ID Name1
    CERT02 1173.5900 2007-01-31 00:00:00.000 10521666 Jamie Arnold
    CERT02 1525.0000 2007-01-31 00:00:00.000 10521667 Jason Caceres
    CERT02 1309.7600 2007-01-31 00:00:00.000 10521670 John Snieder
    CERT02 1030.0000 2007-01-31 00:00:00.000 10521671 Jose Sanchez


    CERT02 545.2000 2007-01-31 00:00:00.000 10521678 Kumarie Dyson
    CERT02 545.2000 2007-01-31 00:00:00.000 10521678 Kumarie Dyson

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372

    Hello Mustish1!

    Look at "DemoQrySumCountA2000.mdb",
    Run Query1.
    Attached Files Attached Files

Posting Permissions

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