I need to obtain the greater of the two counts obtained by calculating rows with particular words in them

106
July 25, 2021, at 07:30 AM

From a table named 'review', I want to find the maximum count among the two conditions.

The values are the total count of rows in column 'text' where the word 'hate' is present and the total count of rows in column 'text' where the word 'love' is present.

I have used aliasing in the 'group by' which seems to have created the error. But either way am not able to find the correct way out.

Select MAX(hate, love)  --trying to obtain greater of the two
From review            -- from Table named Review
Group by text LIKE '%hate%' as hate, text LIKE '%love%' as love;   

text is the name of the column in the table "review". I'm looking for a total count of rows where the word 'hate' and the word 'love' is there. (Separately)

Rent Charter Buses Company
READ ALSO
How to correctly merge multiple csv files in Python

How to correctly merge multiple csv files in Python

How can I correctly merge multiple csv files with, in most cases, different column names between each file? I have tried usingconcat() in the following code:

199
Embed svg in safari doesn't able to call the click event in safari browser

Embed svg in safari doesn't able to call the click event in safari browser

Embed svg in safari doesn't able to call the click event in safari browser

135
React socket io client emitting twice to node server

React socket io client emitting twice to node server

I am making a react app with node as backendThey communicate using socket-io

168
Finding child views from parent view created programmatically in Android

Finding child views from parent view created programmatically in Android

For an Android App, I'm using a GridView and extending BaseAdapter to organize its contentsFor the function getView that I override in my extended BaseAdapter class, I create a LinearLayout, which I attach an ImageView and 3 TextViews to

145