You're responsible for data quality in a streaming service's content catalog. Every night, listings for movies, series, and episodes are sent to the search index and partner storefronts. If a required field is missing, a listing may disappear from search results or end up in the wrong category.
Every record must have values for title, content_type, language_code, and owner_team. A field is considered missing if its value is NULL or becomes an empty string after trimming leading and trailing spaces. Find all listings with at least one missing required field and count how many required fields are missing from each listing.
Return these columns:
- content_id — content listing ID, an integer;
- title — original title, unchanged, as text or NULL;
- content_type — original content type, unchanged, as text or NULL;
- language_code — original language code, unchanged, as text or NULL;
- owner_team — original owning team, unchanged, as text or NULL;
- missing_fields_count — number of missing required fields, an integer from 1 to 4.
Sort the result by missing_fields_count in descending order, then by content_id in ascending order. No rounding is needed. Do not replace NULL values or trim the original values in the output. Exclude listings with all required fields populated. When the number of missing fields is equal, use content_id to determine the order.
content_idtitlecontent_typelanguage_codeowner_teammissing_fields_countShowing the first 3 rows of the sample — the full sample comes with Premium
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in