Im tring to run this code to find the number of users in usa who made more than 10% of their phone calls in english. I think the code makes sense but I get an error when I run it. Is the problem the "Having" statement? Its one table, with columns being user_id, country, call duration, number of calls
SELECT count(distinct user_id),( SELECT (COUNT(*) FROM table WHERE language = 'en' AND country = 'usa')/ SELECT (COUNT(*) FROM table * 100 ) AS Percentage FROM table HAVING percentage > 10