Quote:
The following query estimates the number of orders in the oe.orders table:
SELECT COUNT(*) * 100 FROM orders SAMPLE (1);
The following example creates a sampled subset of the sample table hr.employees table and then joins the resulting sampled table with departments. This operation circumvents the restriction that you cannot specify the sample_clause in join queries:
CREATE TABLE sample_emp AS
SELECT employee_id, department_id FROM employees SAMPLE(10);
SELECT e.employee_id FROM sample_emp e, departments d
WHERE e.department_id = d.department_id
AND d.department_name = 'Sales';