Incomplete Streaming Catalog Records

Incomplete Streaming Catalog Records

You own data quality for a streaming service catalog. Every night, movie, series, and episode records are sent to search indexes and partner storefronts. A missing required field can make a title disappear from search or land in the wrong section. Every record must have title, content_type, language_code, and owner_team. A field is missing when it is NULL or becomes empty after trimming leading and trailing spaces. Find every catalog item with at least one missing required field and count how many required fields are missing. Return columns: - content_id — catalog item identifier, integer; - title — original title without modification, text or NULL; - content_type — original content type without modification, text or NULL; - language_code — original language code without modification, text or NULL; - owner_team — original owning team without modification, text or NULL; - missing_fields_count — number of missing required fields, integer from 1 to 4. Sort by missing_fields_count descending, then by content_id ascending. No rounding is required. Do not replace NULL values or clean the original values in the output. Exclude fully complete records. Use content_id to break ties in the missing-field count.

Exemplo de resposta esperada

É assim que se parece uma resposta correta: ela tem seu próprio número de linhas e não precisa coincidir com as tabelas do esquema. Sua resposta precisa retornar os mesmos nomes de colunas do exemplo: use AS para renomeá-las se for preciso.

content_idtitlecontent_typelanguage_codeowner_teammissing_fields_count
9NULLNULLNULLNULL4
7NULLmovieNULLcinema2
8Open WateresNULL2
PostgreSQLv16
Entre para enviar

O resultado da sua consulta aparecerá aqui

Focus radio
Paused · SomaFM · Fluid