C1_W1_Assignment Cardinality_split

Please explain me this “”“CARDINALITY(SPLIT(review_body, ’ ')”""

statement_num_words = “”"
SELECT CARDINALITY(SPLIT(review_body, ’ ')) as num_words

Hi @noah360,

The query is for counting the number of the words in each of the reviews
SPLIT will split the words based on space.
cardinal will return the unique words out of words.

Best Regards,
A. Sriharsha

1 Like