# Time Between Two Events

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/4383/time-between-two-events
Source observed: 2026-11-05T01:41:05.380Z
Last checked: 2026-11-05T01:41:05.38+00:00
Indexed: 2026-11-06T20:43:39.251+00:00

---

# Time Between Two Events

**Difficulty:** Hard

We ask you to write a function that identifies the user who liked a post in the shortest time after logging in.

## Input schema

```text
user_event                   +---------------+----------+
| user_id       | int      |
| event         | varchar  |
| timestamp     | datetime |
+---------------+----------+
```

## Required output

Your function should output:

```text
user_id | login    | like     | time_between
--------+----------+----------+--------------
int     | datetime | datetime | int
```

`time_between` must be rounded to the nearest minute.

The page currently has no community answers. A code-running area includes **Question**, **Solution**, and **Community** tabs, plus **Editor**, **Share**, **Output**, **Test Results**, and **Console** controls. Sign up to run code: [Sign up to run code](https://www.aced.io/signup?src=lesson).

---

[Read this page’s summary](https://www.aced.io/agents/api/public/v1/page-tldr?url=https%3A%2F%2Fwww.aced.io%2Fquestions%2F4383%2Ftime-between-two-events&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%2F4383%2Ftime-between-two-events). Opening a form does not execute a tool.