# Top Customer by Orders | Aced

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/3973/top-customer-by-orders
Source observed: 2026-11-04T23:27:49.453Z
Last checked: 2026-11-04T23:27:49.453+00:00
Indexed: 2026-11-06T10:29:52.173+00:00

---

# Top Customer by Orders

We provide this **Medium** SQL interview question through Aced (formerly Exponent), our interview-preparation platform. It is categorized under [Coding](https://www.aced.io/questions?type=coding) and [SQL](https://www.aced.io/questions?type=sql).

## Question

You are given the following tables.

### `transactions`

| Column | Type |
|---|---|
| `id` | integer |
| `user_id` | integer |
| `created_at` | datetime |
| `product_id` | integer |
| `quantity` | integer |

### `products`

| Column | Type |
|---|---|
| `id` | integer |
| `name` | string |
| `price` | float |

### `users`

| Column | Type |
|---|---|
| `id` | integer |
| `name` | string |
| `sex` | string |

Write a query to find the name of the customer who has placed the largest number of orders in total. Your output should contain:

- `user_id`
- `name`
- `orders` — the total number of orders made by the user

## Access and practice

Detailed company statistics for this question require [Upgrade](https://www.aced.io/upgrade?src=questions). We provide an editor with **Question**, **Solution**, and **Community** tabs, plus **Editor**, **Share**, **Output**, and **Test Results** views. You can [sign up to run code](https://www.aced.io/signup?src=lesson).

No community answers have been contributed yet.

## Related questions

- [Find Top Customer by Year](https://www.aced.io/questions/3977/find-top-customer-by-year)
- [Sales by Customer City](https://www.aced.io/questions/3048/sales-by-city)
- [Revenue by Customer City](https://www.aced.io/questions/4378/revenue-by-customer-city)

## Aced interview preparation

We offer interview courses and practice across Product Management, Forward Deployed Engineering, Engineering Management, Software Engineering, System Design, Data Science, Machine Learning, Data Engineering, AI Engineering, Investment Banking, Generative AI, Security Engineering, TPM, Solutions Architecture, UX / Product Design, and BizOps & Strategy. We also offer interview coaching, resume review, salary negotiation, job referrals, resources, and business and university programs.

- [All Questions](https://www.aced.io/questions)
- [Courses](https://www.aced.io/courses?src=nav)
- [Practice](https://www.aced.io/practice?src=nav)
- [Coaching](https://www.aced.io/coaching?src=nav)
- [Pricing](https://www.aced.io/upgrade?src=nav)
- [Sign up](https://www.aced.io/signup?src=nav)
- [Log in](https://www.aced.io/login?src=nav)

---

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