S
Steve
I'm trying to write the query for returning subtotal from the Results. I
went to Thingumajig and followed the instructions and the query will return
subtotals, only if I remove the SELECT Count portion of the code.
SELECT State, ILN, ACO, (Select Sum(ACO) FROM Results AS Results_1 WHERE
Results_1.ILN = Results.ILN AND Results_1.State = Results.State) As TotalACO
FROM Results; of course I get a total for every row, so when I put in the
count part of the query I get the DB error.
This is what I've writen for the Count:
SELECT State, ILN, ACO, (Select Sum(ACO) FROM Results AS Results_1 WHERE
Results_1.ILN = Results.ILN AND Results_1.State = Results.State) As TotalACO,
(SELECT Count(ACO) FROM Results AS Results_1 WHERE Results_1.ILN =
Results.ILN AND Results_1.State = Results.State) AS Count FROM Results;
Being new to coding in FP I'm lost. Any assistance would be most
appreciative.
Steve
went to Thingumajig and followed the instructions and the query will return
subtotals, only if I remove the SELECT Count portion of the code.
SELECT State, ILN, ACO, (Select Sum(ACO) FROM Results AS Results_1 WHERE
Results_1.ILN = Results.ILN AND Results_1.State = Results.State) As TotalACO
FROM Results; of course I get a total for every row, so when I put in the
count part of the query I get the DB error.
This is what I've writen for the Count:
SELECT State, ILN, ACO, (Select Sum(ACO) FROM Results AS Results_1 WHERE
Results_1.ILN = Results.ILN AND Results_1.State = Results.State) As TotalACO,
(SELECT Count(ACO) FROM Results AS Results_1 WHERE Results_1.ILN =
Results.ILN AND Results_1.State = Results.State) AS Count FROM Results;
Being new to coding in FP I'm lost. Any assistance would be most
appreciative.
Steve