Hav an ms-access table in the following format...
Customer ID Year Amount
1000 1990 100
1000 1990 100
1000 1991 500
1000 1995 200
1001 1992 1000
1002 1989 300
1002 1990 200
is it possible to run an sql query so that I get the data in the below mentioned format
i need no. of distinct years and the sum of amounts for all yrs. against each customer
Customer ID Year Amount
1000 3 900
1001 1 1000
1002 2 500
Customer ID Year Amount
1000 1990 100
1000 1990 100
1000 1991 500
1000 1995 200
1001 1992 1000
1002 1989 300
1002 1990 200
is it possible to run an sql query so that I get the data in the below mentioned format
i need no. of distinct years and the sum of amounts for all yrs. against each customer
Customer ID Year Amount
1000 3 900
1001 1 1000
1002 2 500