CREATE TABLE person (name CLOB, age NUMBER, city CLOB, gender CLOB, job CLOB)
CREATE TABLE personfriend (name CLOB, friend CLOB, year NUMBER)

How many people are under 40 for each gender?
SELECT COUNT(*), gender FROM person WHERE age < 40 GROUP BY gender
SELECT COUNT(*), "gender" FROM "person" WHERE "age" < 40 GROUP BY "gender"