FastPrepAdvertising System Failures Report

Advertising System Failures Report

AT&T logoAT&T● EasyNEW GRADOA

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

ColumnTypeNullableDescription
idPKIntegerNo—
first_nameTextNo—
last_nameTextNo—

campaigns

ColumnTypeNullableDescription
idPKIntegerNo—
customer_idIntegerNo—
nameTextNo—

Foreign key: customer_id → customers(id)

events

ColumnTypeNullableDescription
dtPKTimestampNo—
campaign_idIntegerNo—
statusTextNo—

Foreign key: campaign_id → campaigns(id)

Expected result

Your query or function must return these columns.

ColumnTypeNullableDescription
customerTextNo—
failuresIntegerNo—

Row order: any order is accepted. Numeric tolerance: 0.

Constraints

  • Only rows whose status is exactly failure count.
  • 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 problems

See AT&T hiring insights