Hi, I need some help with my ACCESS SQL query.
I have a tbl_Main, which records daily transactions for all the clients.
i need to find a summary of top 20 clients with their sum of income with a ranking column.
what i did is I use two queries to get the result.
1.
SELECT TOP 25 tbl_main.[Client Name], Sum(tbl_main.Income) AS [Total Income]
FROM tbl_main
GROUP BY tbl_main.[Client Name]
ORDER BY Sum(tbl_main.Income) DESC;
(This query is just to find the client with income in a groupby version, the name of this query is "qry_Client")

2.
SELECT (SELECT COUNT(*) from [qry_client] WHERE [qry_client].income > country.income)+1 AS Rank, *
FROM qry_Client AS country;
(This sub-query is to add the ranking column)

My goal is to combine this two queries into one single query, is it possible?
thanks a lot in anticipation.