Skip to content
Advertisement

How do I use one SQL statement to invalidate groups of records?

I’m working on an assignment for class. I need to write an SQL statement that returns every single country in the database where no single ethnic group makes up more than 25% of the population. This is the closest I can get:

But, that only returns records where ethnic groups are over 25% population. It doesn’t remove other rows in the table where a different ethnic group for the same country is under 25%.

The table looks like this (I limited the snippet below to 10 entires. It’s much, MUCH bigger.):

Advertisement

Answer

I think you are looking for this

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement