This Python script farms points for the "Top Users" leaderboard on Oracle Academy Application Express.
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.

queries.txt 3.1KB

  1. # APEXPointsFarmer Master Query List
  2. # This list contains all of the queries in the repo, with no sorting. Do not use this for documentation or education, use this for point farming.
  3. # Feel free to add more queries, but document them in different text files and add them here afterwards.
  4. SELECT to_date('7.4.07', 'MM.DD.YY') FROM dual;
  5. SELECT to_number('-$12,345.67','$99,999.99') FROM dual;
  6. SELECT coalesce(null, null, '33', 'test') FROM dual;
  7. SELECT to_char(to_date('15','yy'),'yyyy'), to_char(to_date('75','yy'),'yyyy') FROM dual;
  8. SELECT to_char(-123.45,'999.999PR') FROM dual;
  9. SELECT SUBSTR('curious_george', INSTR ('curious_george', ' ', -1, 3) + 1, LENGTH ('cute')) FROM dual;
  10. SELECT to_char(sysdate,'mmsp') FROM dual;
  11. SELECT SUBSTR('super', -1) FROM dual;
  12. SELECT lower('ARE') FROM dual;
  13. SELECT upper(' are') FROM dual;
  14. SELECT concat(' super','duper') FROM dual;
  15. SELECT initcap('mare') FROM dual;
  16. SELECT substr('abcd',2,2) FROM dual;
  17. SELECT instr('abcdefgh','de') FROM dual;
  18. SELECT lpad('vreau',6,'eeee') FROM dual;
  19. SELECT rpad('vreau',8,' lol') FROM dual;
  20. SELECT trim(leading 'e' FROM'eeelefant') FROM dual;
  21. SELECT trim(trailing 'e' FROM 'eeelefanteee') FROM dual;
  22. SELECT trim(both 'e' FROM 'eeelefanteee') FROM dual;
  23. SELECT replace('latelatelate', 'la', 'nu') FROM dual;
  24. SELECT abs(-5.23) FROM dual;
  25. SELECT abs(5) FROM dual;
  26. SELECT power(2,5) FROM dual;
  27. # Here on out are SELECT queries on actual tables in the schema we have in RO_A522_SQL_T01
  28. # Copied verbatim from queries_employees.txt
  29. SELECT * FROM employees;
  30. SELECT DISTINCT first_name FROM employees;
  31. SELECT employee_id, first_name||' '||last_name AS Name, salary FROM employees WHERE salary < 5000;
  32. SELECT last_name||', '||first_name AS legal_name FROM employees;
  33. SELECT first_name||' '||last_name AS Employee, department_id FROM employees WHERE salary > 5000;
  34. SELECT first_name||' '||last_name AS Employee, salary, salary * 1.25 AS Salary_With_Raise FROM employees WHERE salary < 7000;
  35. SELECT first_name||' '||last_name AS Employee FROM employees WHERE first_name LIKE 'B%';
  36. SELECT 'Number: '||phone_number||', E-mail: '||email AS contact_info FROM employees;
  37. SELECT first_name||' '||last_name AS Employee FROM employees WHERE hire_date > '06.02.1990' AND hire_date < '06.05.1997';
  38. SELECT country_id FROM countries;
  39. SELECT country_id AS id, country_name AS name FROM countries WHERE region_id > 1 AND region_id < 4;
  40. SELECT 'Name: 'country_name||', ID: '||country_id||', Region ID: '||region_id AS Information FROM countries;
  41. SELECT * FROM departments WHERE manager_id > 100 AND manager_id < 201;
  42. SELECT department_name, department_id FROM departments WHERE department_name LIKE '_h%';
  43. SELECT location_id, department_name AS name FROM departments WHERE location_id < 2000;
  44. SELECT department_name AS name, manager_id FROM departments WHERE department_name = 'Marketing';
  45. SELECT * FROM departments WHERE location_id = 2500;
  46. SELECT department_id, department_name FROM departments WHERE department_id > 59;
  47. SELECT d.department_id, d.department_name, e.employee_id, e.first_name||' '||e.last_name as employee_name, e.salary, e.bonus FROM departments d INNER JOIN employees e ON e.manager_id = d.manager_id;