This is an old revision of the document!
select decode(cc, 0, 'alt', 1, 'mittel', 2, 'jung'), count(cc) from ( select (case when jahr > 15 then 0 when jahr > 10 then 1 else 2 end) cc from ( select first_name, last_name, trunc(MONTHS_BETWEEN(SYSDATE, hire_date)/12) jahr from employees ) ) group by cc order by cc
SELECT COUNTRIES.COUNTRY_NAME, count(DEPARTMENTS.DEPARTMENT_ID) FROM DEPARTMENTS , LOCATIONS , COUNTRIES WHERE ( (LOCATIONS.LOCATION_ID = DEPARTMENTS.LOCATION_ID) AND (COUNTRIES.COUNTRY_ID = LOCATIONS.COUNTRY_ID) ) group by COUNTRY_NAME