Internet Service Provider Monthly Report
Reported by candidates from Point72's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.
Point72 reported this SQL question in July 2026, and the thing it hinges on is a single grouped aggregate over a join, not anything fancy. If your OA lands in the next day or two, expect a billing report: join clients to traffic, filter to May, sum the traffic, multiply by the tariff, round once. It looks like a warm-up, but the rounding and ordering rules are where people lose points. StealthCoder sits invisibly on your screen as a safety net if you blank mid-assessment, but this one is very doable if you read the rules carefully.
The problem
An Internet service provider wants a billing report for client traffic recorded in May. Each client has a MAC address and a tariff per unit of traffic. Using the clients and traffic tables, return mac_address, total_traffic, and total_cost for each client with at least one May traffic event. total_traffic is the sum of that client's traffic amounts in May. total_cost is total_traffic * tariff, rounded once to two decimal places. For example, 5.004 becomes 5.00. Order rows by the returned total_cost descending, then by mac_address ascending. For this exercise, assume the following table and billing rules: clients(id, mac_address, tariff) has one row per client. IDs and MAC addresses are unique. MAC addresses use six uppercase hexadecimal pairs separated by colons, such as 00:00:00:00:00:0A. traffic(client_id, recorded_at, amount) has one row per traffic event. Every row references a client. There are no null values. Identical traffic rows represent separate events and all count. May means calendar month 5 in every input year. Timestamps are timezone-free calendar values; do not restrict the report to one year. Include a client with a May event even when its total traffic or cost is zero. Omit clients with no May event. Compute with exact decimal values. Round cost only after summing traffic and multiplying by the tariff; halfway values round away from zero, so 5.005 becomes 5.01. Use rounded costs for sorting. In MySQL and PostgreSQL, write a query over the supplied tables. In Pandas, implement monthly_report(clients, traffic) and return a DataFrame with the three result columns in the stated order. Tables clients: id PK (Integer), mac_address (Text), tariff (Decimal) traffic: client_id (Integer), recorded_at (Timestamp), amount (Decimal) Constraints For this exercise, assume 0 <= clients.length <= 100 and 0 <= traffic.length <= 2000. Client IDs are integers from 1 through 1000000000. Traffic amounts are nonnegative decimals at most 1000000, with at most two fractional digits. Tariffs are decimals from 0 through 1000, with at most three fractional digits. Timestamp years range from 1990 through 2037. All timestamps are valid timezone-free calendar values. The table rules in the statement apply to every case, including empty tables.
Reported by candidates. Source: FastPrep
Pattern and pitfall
The query is an inner join of clients and traffic, filtered on month 5 of recorded_at with no year restriction, then GROUP BY client. Inner join handles the omit-clients-with-no-May-event rule for free. Compute SUM(amount) as total_traffic, then ROUND(SUM(amount) * tariff, 2) as total_cost. The pitfalls are three. First, round once, after the multiply, never per row. Second, ORDER BY the rounded total_cost descending, then mac_address ascending. Third, use exact decimals, so don't cast to float. Zero-traffic clients with a May event stay in, which the inner join already gives you. Group by id, mac_address and tariff so the engine accepts it. If you freeze on the rounding or month filter syntax in the live OA, StealthCoder is the hedge that reads the prompt and hands you the query.
If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.
You can drill Internet Service Provider Monthly Report cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.
Get StealthCoderRelated leaked OAs
You've seen the question.
Make sure you actually pass Point72's OA.
Point72 reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.
Internet Service Provider Monthly Report FAQ
How hard is the Point72 Internet Service Provider Monthly Report question really?+
Easy to medium. It's one join, one filter, one group, one round, and an order. The difficulty is in the fine print: round once, exact decimals, no year filter, and sorting by the rounded cost. If you read every rule, it's quick.
What's the trick to the May filter?+
Filter on the month part of recorded_at equal to 5 and ignore the year entirely. The statement says May means calendar month 5 in every input year, so events from 1990 through 2037 all count. Use EXTRACT(MONTH FROM recorded_at) = 5 in PostgreSQL or MONTH(recorded_at) = 5 in MySQL.
How should I handle rounding so I don't fail edge cases?+
Sum the traffic first, multiply by the tariff, then call ROUND(..., 2) exactly once. Keep everything as DECIMAL or NUMERIC, never float. Halfway values round away from zero, so 5.005 becomes 5.01. Sort using the rounded value, which is what the output column holds.
Do clients with zero traffic or no May events show up?+
A client with a May event but zero total traffic or cost stays in the result. A client with no May event is omitted. An inner join from clients to traffic with the May filter in the WHERE clause gives exactly that behavior, including on empty tables.
How do I prepare for this in 48 hours?+
Write the query once from scratch in the SQL dialect you'll use. Practice a join plus GROUP BY with SUM, a month filter, ROUND, and a two-key ORDER BY. Then test empty tables and a halfway rounding case. That covers nearly everything this question can throw at you.