set echo on;

alter session set nls_language = english;
alter session set nls_date_format = 'DD-MON-YYYY';
alter session set nls_date_language = english;


/* COUNT 3 PARTITIONS */
SELECT COUNT(*) FROM PASSAGIER;

/* COUNT 3 PARTITIONS */
SELECT COUNT(*) FROM BUCHUNG;

/* COUNT 1 PARTITION */
SELECT COUNT(*) FROM BUCHUNG
WHERE FLC = 'LH';

/* MAX 3 PARTITIONS */
SELECT MAX(BNR) FROM BUCHUNG;

/* MAX 1 PARTITION */
SELECT MAX(BNR) FROM BUCHUNG
WHERE FLC = 'AC';

/* MIN 1 PARTITION */
SELECT MIN(BNR) FROM BUCHUNG
WHERE FLC = 'BA';

/* MIN 2 PARTITION */
SELECT MIN(BNR) FROM BUCHUNG
WHERE FLC = 'AF' OR FLC = 'BA';

/* SUM 3 PARTITIONS */
SELECT SUM(MEILEN) FROM BUCHUNG;

/* SUM 1 PARTITION */
SELECT SUM(MEILEN) FROM BUCHUNG
WHERE FLC = 'AF' OR FLC = 'BA';

/* AVG 3 PARTITIONS */
SELECT AVG(MEILEN) FROM BUCHUNG;

/* AVG 1 PARTITION */
SELECT AVG(MEILEN) FROM BUCHUNG
WHERE FLC = 'AF' OR FLC = 'BA';





rollback;

