Advertising System Failures Report
Updated
Problem statement
HackerAd analyzes events from advertising campaigns. Produce a report of every customer who has more than three campaign events whose status is exactly failure.
Return two columns: customer, the customer's first and last names separated by one space, and failures, the total number of matching failure events across all campaigns owned by that customer.
Table schema
MySQLPostgreSQLPandas
Use the same input data with any supported language. Open the Schema tab in the editor to see the generated SQL setup or Pandas DataFrames.
customers
| Column | Type | Nullable | Description |
|---|---|---|---|
| idPK | Integer | No | — |
| first_name | Text | No | — |
| last_name | Text | No | — |
campaigns
| Column | Type | Nullable | Description |
|---|---|---|---|
| idPK | Integer | No | — |
| customer_id | Integer | No | — |
| name | Text | No | — |
Foreign key: customer_id → customers(id)
events
| Column | Type | Nullable | Description |
|---|---|---|---|
| dtPK | Timestamp | No | — |
| campaign_id | Integer | No | — |
| status | Text | No | — |
Foreign key: campaign_id → campaigns(id)
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| customer | Text | No | — |
| failures | Integer | No | — |
Row order: any order is accepted. Numeric tolerance: 0.
Constraints
- Only rows whose status is exactly
failurecount. - A failure is attributed through
events.campaign_id -> campaigns.id -> campaigns.customer_id -> customers.id. - Include a customer only when the total number of failures is greater than three.
- Each customer ID, campaign ID, and event timestamp is unique within its table.
- The result row order is not significant.
More AT&T Online Assessment questions
- Companies with Average Salary Above 40000OA · Seen Oct 2026
- Count Proper Prefix MatchesOA · Seen Oct 2026
- Minimum Binary Swaps to a PalindromeOA · Seen Oct 2026
- 3SumOA · Seen Oct 2025
- Break a PalindromeOA · Seen Oct 2025
- Counting Triplets Divisible by DOA · Seen Nov 2024
- Project EstimatesOA · Seen Nov 2024
Similar questions at other companies
- Build Taxi Driver Performance FeaturesBoston Consulting Group · OABoston Consulting Group interview questions
- Students Scoring Above AverageCapstone Investment Advisors · OA
- Bond Interest Summary Above 3%Wells Fargo · OAWells Fargo interview questions
- Employee Promotion OpportunitiesIntuit · OAIntuit interview questions
- Students and Their SubjectsBirla Pivot · OA
- Weekend Appointments for Consular Services ReschedulingMcKinsey & Company · OAMcKinsey & Company interview questions
- Companies Above a Salary ThresholdVerisk · OA
- Customer Resource Usage AnalysisIBM · OAIBM interview questions
- Customers Who Never OrderedAccenture · OAAccenture interview questions
- First Duplicate Transaction Within Ten MinutesLenskart · OA