TV Series in a Production Window
Updated
Problem statement
Filter TV-series records by their production years.
The runtime_of_series value has one of four forms:
(2020-2021): the first and last production years;(2020-): still in production;(2020): produced for one year; or- one of those forms preceded by
(I)or(II), which must be ignored.
For a finite end_year, keep shows that started in start_year or later and ended in end_year or earlier. When end_year is -1, keep shows that started in start_year or later and are still in production. Return show names in alphabetical order.
In the assessment, every page came from a supplied HTTP endpoint. Here the combined API records and query window are supplied directly as tables.
Table schema
Pandas
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.
tv_series
| Column | Type | Nullable | Description |
|---|---|---|---|
| name | Text | No | — |
| runtime_of_series | Text | No | — |
| certificate | Text | No | — |
| runtime_of_episodes | Text | No | — |
| genre | Text | No | — |
| imdb_rating | Decimal | No | — |
| overview | Text | No | — |
| no_of_votes | Integer | No | — |
| idPK | Integer | No | — |
query_window
| Column | Type | Nullable | Description |
|---|---|---|---|
| start_year | Integer | No | — |
| end_year | Integer | No | — |
Expected result
Your query or function must return these columns.
| Column | Type | Nullable | Description |
|---|---|---|---|
| name | Text | No | — |
Row order: must match exactly. Numeric tolerance: 0.
Constraints
- The
query_windowtable contains exactly one row. - Every runtime string follows one of the four documented forms.
- Show names are compared case-sensitively for output ordering.
More Agoda Online Assessment questions
- Special Diameter EndpointsOA · Seen Nov 2025
- Count One Groups by SizeOA · Seen Jul 2025
- Minimum Price With Discount CouponsOA · Seen Jul 2025
- Lexicographically Smallest Task QueueOA · Seen Jul 2025
- Highest-Ranked University by CountryOA · Seen Jun 2025
- Jump Game with Prime-3 StepsOA · Seen Jun 2025
- Team FormationOA · Seen Apr 2025
- Two-Core Process AssignmentOA · Seen Apr 2025
- Unique Digits in RangeOA · Seen Apr 2025
- Maximize Sum of Processed TimesOA · Seen Sep 2024
Similar questions at other companies
- Piecewise Linear Interpolation and ExtrapolationTwo Sigma · OA
- Remove CSS Comments and Find Hex ColorsAdobe · OA
- Order LayoutAmazon · OA
- Evolving Merchant Clusters and Persistent PinsStripe · OA
- Top K Movies by Play Count from CSV DataTubi · PHONE SCREEN
- Transform Dotted Keys into a Nested MapProofpoint · ONSITE INTERVIEW
- Serialize and Deserialize a String Key-Value StoreByteDance · ONSITE INTERVIEW
- Validate Server Log Summary CountsGoogle · ONSITE INTERVIEW
- Structured Log Stream with QueriesOpenAI · PHONE SCREEN
- Server Log Summary and Minute AnomaliesNinjaTrader · PHONE SCREEN