Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a phone bill in Excel that shows all calls made to and from my phone and I imported it into a table in Access 2007. I want to learn to use Access to do a simple query to determine who I talk to the most.

Say we have Column A (caller) and Column B (person being called), and that my number will always be in either column. How do I make a query in Access to determine which phone number I talk the most with? I've got the Table with the Excel data in it, but I need some step-by-step handholding to learn how to do the query.

In simple english, I want to query all phone calls that contain my number in either column A or column B. Then, I want to count each unique pair (mynumber + othernumber or othernumber + mynumber should be counted under the same pair). Then, I want to count/summarize each unique pair to see which pair yields the highest count.

E.g. Go to Create ribbon, click Query Wizard, etc...


share|improve this question

You can quickly and easily see the numbers that called you or you called with a GROUP BY query.

SELECT Caller from phonebook GROUP BY CALLER or SELECT [Person being called] from phonebook GROUP BY [person being called]

If you want to merge the two columns you must use a UNION query.

SELECT Caller AS A FROM phonebook UNION ALL SELECT [person being called] AS A from phonebook. Save that query. In a new query type SELECT A FROM [new query name] GROUP BY A

Perhaps studying SQL would be a good idea. W3Schools is a good resource

share|improve this answer
Transactional SQL is so much fun! – Mark Allen Jul 24 '12 at 2:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.