Question: Look at the student-code.sql below to see what a homework file looks like. Each problem is described on a problem line that starts with something

Look at the student-code.sql below to see what a homework file looks like. Each problem is described on a problem line that starts with something like "-- 4. ". The student response is on the lines following the problem.

Instructions: Given an input value, like 4, the AWK script should return the student response to the problem. Please note that a student response ends with either: a new problem line, the end of the file, or a line that begins with three or more hyphens.

********** student-code.sql **********************************

-- 4. what is the average age of people from China? select avg(age) from census where native_country ='China';

-- 5. what is the average age of people from Taiwan? select avg(age) from census where native_country ='Taiwan';

-- 6. which native countries have "land" in their name? select distinct(native_country) from census where native_country like '%land$

******************************************************************

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!