MS Query in Excel

P

Peter

I am new to SQL and using MS Query in Excel to extract
data from SQL Server.

The query retrives result from a number of tables and the
result is in the following format:

Card Number, Paid Date, Fee Paid, Total Fee Paid
1234, 23-11-2002, $20, $50
1234, 28-10-2003, $30, $50
1235, 10-10-2002, $20, $40
1235, 10-10-2003, $20, $40

Is there any way (like filtering / hiding column) to get
the following result:

Card Number, Total Fee Paid
1234, $50
1235, $40

Thanks
 
O

onedaywhen

...
I am new to SQL and using MS Query in Excel to extract
data from SQL Server.

The query retrives result from a number of tables and the
result is in the following format:

Card Number, Paid Date, Fee Paid, Total Fee Paid
1234, 23-11-2002, $20, $50
1234, 28-10-2003, $30, $50
1235, 10-10-2002, $20, $40
1235, 10-10-2003, $20, $40

Is there any way (like filtering / hiding column) to get
the following result:

Card Number, Total Fee Paid
1234, $50
1235, $40


SELECT DISTINCT
[Card Number], [Total Fee Paid]
FROM MyTable

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top