You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
689 B

4 years ago
  1. set echo on;
  2. alter session set nls_language = english;
  3. alter session set nls_date_format = 'DD-MON-YYYY';
  4. alter session set nls_date_language = english;
  5. /* SELECT GROUP BY */
  6. SELECT FLC, COUNT(*) FROM FLUG GROUP BY FLC;
  7. /* SELECT GROUP BY WHERE */
  8. SELECT FLC, COUNT(*) FROM FLUG WHERE (VON = 'FRA') GROUP BY FLC;
  9. /* SELECT GROUP BY WHERE NOTHING */
  10. SELECT FLC, COUNT(*) FROM FLUG WHERE (VON = 'ZZZ') GROUP BY FLC;
  11. /* SELECT GROUP BY HAVING */
  12. SELECT PNR, SUM(MEILEN) FROM BUCHUNG GROUP BY PNR HAVING COUNT (*) = 1;
  13. /* SELECT GROUP BY HAVING WHERE */
  14. SELECT VON, MAX(PREIS) FROM BUCHUNG WHERE (BNR > 20) GROUP BY VON HAVING COUNT (*) > 2;
  15. rollback;