Skip to content
Advertisement

Need to list the rows contained in a count(*) Access

Hello everyone and thank you in advance for your help.

I’m having troubles with an SQL query in access.

I have Database

I need the following output ( show and list the Store Number and PaidMoney ONLY where Paid money is the same amount 2 or more times only) desired output

I already have 2 queries which kind of solve the problem, but each of the queries I have only solve 50% of the answer I need, the first lists all the results not only the duplicates , and the second query tells me how many duplicates there are but doesnt list and show the duplicates to me.

First Query

Second query

Thank you all for your time and help!

Advertisement

Answer

You can join the 2 queries together and only “select” the columns from the first query. The second query will just filter out the rows from the first query that only appear once. Rows from the first query that appear more than once should appear as many times as they appear in the first query.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement