# Find the number of users who called three or more people in the last week

Aced (formerly Exponent) publishes a public search API over its indexed pages; the guide is at https://www.aced.io/agents/agent-access.

Source: https://www.aced.io/questions/4167/count-users-calls-last-week
Source observed: 2026-11-04T21:34:33.109Z
Last checked: 2026-11-04T21:34:33.109+00:00
Indexed: 2026-11-05T02:30:03.277+00:00

---

# Find the number of users who called three or more people in the last week

We are Aced, formerly Exponent. This public interview-question page helps candidates practice a SQL problem: count users who initiated calls to at least three distinct people during the last seven days. The page is categorized under **Coding** and **SQL**, and its metadata shows 7 interviews, with the question last asked a year ago.

[All Questions](https://www.aced.io/questions)

## Interview experience

One interview experience is shared:

- [Amazon · a year ago](https://www.aced.io/experiences/amazon-software-engineer-interview-1b744e) — “The process was straightforward and detailed. All communications were done promptly and I was notified of every stage.” Role: Software Engineer, Entry Level / L3.

## Community answers

The page contains 15 community answers. The answers below preserve the substantive answers visible in the supplied content.

### Aarushi S. — October 5, 2026

[Aarushi S.](https://www.aced.io/users/2bc3780b-a7a1-41b3-8967-f44226dfc3cd) · [430 karma](https://www.aced.io/karma "430 karma")

#### Clarifying questions and assumptions

- “Three calls to distinct people” or three distinct calls to the same person?
- Does “last week” mean a rolling seven-day window or the previous calendar week, Monday through Sunday?
- Should the query count calls initiated by the user, calls received by the user, or both?

The answer assumes:

1. Three distinct people.
2. A rolling seven-day window.
3. Only calls initiated by the user.

#### Suggested tables

- `users`: `[user_id, user_name, signup_date]`
- `calls`: `[call_id, caller_id, recipient_id, call_timestamp, call_duration]`

#### Query

```sql
SELECT COUNT(*) AS num_users
FROM (
  SELECT caller_id
  FROM calls c
  WHERE call_timestamp >= CURRENT_DATE - INTERVAL 7 DAY
  GROUP BY caller_id
  HAVING COUNT(DISTINCT recipient_id) >= 3
) t;
```

#### Mental model

```text
Calls
↓
Filter last 7 days
↓
Group by caller
↓
Count DISTINCT recipients
↓
Keep condition >= 3
↓
Count qualifying users
```

### Sankeerth K. — October 28, 2026

[Sankeerth K.](https://www.aced.io/users/27fd5a55-2b96-46dc-909f-6ef4742965c1) · [22 karma](https://www.aced.io/karma "22 karma")

```sql
SELECT COUNT(*) AS num_users
FROM (
  SELECT caller_id
  FROM calls c
  WHERE call_timestamp >= CURRENT_DATE - INTERVAL 7 DAY
  GROUP BY caller_id
  HAVING COUNT(DISTINCT recipient_id) >= 3
) t;
```

### Vitor C. — updated October 19, 2026

[Vitor C.](https://www.aced.io/users/5db380a6-4030-486e-a003-ed183c377adf) · [3 karma](https://www.aced.io/karma "3 karma")

The answer is labeled SQL and uses a common-table expression:

```sql
WITH COUNT_BY_CALLER AS (
  SELECT CALLER_ID, COUNT(1) AS COUNT_CALLS
  FROM CALLS
  WHERE CALLS.DATE BETWEEN (DATEADD(-7, DAY, GETDATE()) AND GETDATE()
  GROUP BY CALLER_ID
)
SELECT *
FROM COUNT_BY_CALLER AS C
WHERE C.COUNT_CALLS >= 3
```

### E B. — January 23, 2025

[E B.](https://www.aced.io/users/66c426e8-851c-4140-b56e-925e75bdc0a6) · [552 karma](https://www.aced.io/karma "552 karma")

The answer clarifies these interpretations:

1. Count users by unique user ID.
2. “More than three people” means counting unique recipient user IDs, rather than every call instance.
3. “Last week” means the last seven days from today.

```sql
SELECT User_id,
       COUNT(distinct called_user_id) as users_called_count
FROM calls
WHERE call_date between current_date - interval ‘7 day’ and current_date
GROUP BY user_id
HAVING COUNT(distinct called_user_id) >= 3
```

This query returns a table; the answer notes that it can be made into a subquery or common table expression to obtain the final `count(user_id)`.

### KAI — August 26, 2024

[KAI](https://www.aced.io/users/068fe7b4-c000-41fc-977c-85e1cb61bc55) · [886 karma](https://www.aced.io/karma "886 karma")

```sql
select from_caller, count(DISTINCT to_callee) as num_calls
from calls
group by from_caller
having count(DISTINCT to_callee) >= 3
```

Sample setup:

```sql
CREATE TABLE calls (
  from_caller VARCHAR(20),
  to_callee VARCHAR(20)
);

INSERT INTO calls (from_caller, to_callee)
VALUES
  ('Alice', 'Bob'),
  ('Charlie', 'Dave'),
  ('Alice', 'Frank'),
  ('Charlie', 'Heidi'),
  ('Charlie', 'Judy');
```

The inserted names and calls are sample data for demonstrating the query.

## Related questions

- [Estimate the number of people who use Google Search to find a new job.](https://www.aced.io/questions/3681/estimate-job-searchers-using-google)
- [Find the first or last occurrence of a given number in a sorted array.](https://www.aced.io/questions/1140/find-first-last-occurrence-given-number-sorted-array)

## Related courses

### [Data Analyst Interview Prep](https://www.aced.io/courses/data-analytics)

![Data Analyst Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/72OTqij57b2TklhaD2vrdV/be0dae6242904970d1696e5a4d858e18/AdobeStock_1357126576.jpeg?w=800&h=800&fm=webp&q=75)

Prepare for data analyst interviews across product, marketing, and business analyst roles. The course covers real take-home case studies, technical and dashboarding skills, and strategies from interviewers at technology companies and startups.

### [Data Science Interview Prep](https://www.aced.io/courses/data-science)

![Data Science Interview Prep](https://images.ctfassets.net/x78yjrjc11pq/3U4C5C0OkDR0UeGch4AmlE/7ad489430b676a088cb973307fe77884/Data_Science_Interview_Prep_Course.jpeg?w=800&h=800&fm=webp&q=75)

Prepare for data science roles at Google, Amazon, Microsoft, Meta, Apple, and other companies. The course includes mock interviews, frameworks, and advice from senior candidates, with practice in statistics, experimentation, coding, SQL, machine learning, behavioral interviews, and more.

## Answer submission

The page provides an editor for submitting an answer. Submitting marks the question complete.

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4167%2Fcount-users-calls-last-week&trace=t_679ff9ab98f3)

## Ask a follow-up about this page

Need a more specific answer? Ask the exact question you have. It returns a fresh, cited answer from Aced (formerly Exponent)’s knowledge base. No account or API key required.

Open this URL with your own question, URL-encoded. Include your question in q. All research inputs are optional; no account or setup.

`GET https://www.aced.io/agents/agent/faq?q={question}&trace=t_679ff9ab98f3`

[Tool guide and examples](https://www.aced.io/agents/agent-access) · [OpenAPI](https://www.aced.io/agents/api/public/v1/openapi.json) · [Page TLDR form](https://www.aced.io/agents/agent-tools/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4167%2Fcount-users-calls-last-week). Opening a form does not execute a tool.