7 Add the following queries that returns rows find all find
7. Add the following queries that returns rows: find all, find by max population, find by min population, find by city (starts with a part of the name), find by city (exact), find by population
Solution
Find all population:-
SELECT Population FROM population ORDER BY Population;
Find by Max population:-
SELECT MAX(Population) FROM population;
Find by Min population:-
SELECT MIN(Population) FROM population;
Find by city start with part of name:-
SELECT city FROM population WHERE city LIKE \'PART_NAME%\' ORDER BY city;
Find by city exact name:-
SELECT city FROM population WHERE city = \'PART_NAME\' ORDER BY city;
Find by population:-
SELECT Population FROM population WHERE Population = \'SOME VALUE\' ORDER BY Population.
I will sugest table name and cloumn name must be diffrent it will help to write query.
User above query with program and it will return you the oputput you want.
