Use the SELECT statement to create a constant column with the value 'bull'.
Use the REGEXP operator within a CASE statement to check if the content column contains the standalone word 'bull' surrounded by spaces or at the beginning/end of a line.
Use the SUM function to count the number of files where the standalone word 'bull' appears at least once.
Repeat steps 1-3 for the standalone word 'bear'.
Use the UNION operator to combine the results of the two SELECT statements into a single result set.
Return the result set with the word and its corresponding count.
erDiagram
Files {
varchar file_name PK
text content
}
Total Occurrence Count Using String Matching with Spaces