Home › Forums › AWS › AWS Certified Data Engineer Associate DEA-C01 › quiz 3, question 41: Regexp_count function – does not return a list › Reply To: quiz 3, question 41: Regexp_count function – does not return a list
-
Hello paul10101,
Thanks for the feedback.
You’re absolutely right to question that. At first glance, REGEXP_COUNT does sound like it’s returning a count rather than a list. But in this case, it’s being used inside a WHERE clause, which means we’re not interested in the actual count value. We’re just checking whether it’s non-zero (i.e., whether the pattern matches). If it does, the row is included in the result set.
So even though the function name says “COUNT,” the query is still returning a list of rows where the category starts with either “TAD” or “AGO.” You may refer to the given explanation, especially the image attached, since it shows the actual output, which lists the rows where the category starts with either “TAD” or “AGO.” That confirms the query behaves as intended.
I hope this helps! Let us know if you need further assistance.
Best regards,
JR @ Tutorials Dojo