Using a simple CTE, first compute the count of customers per…

Using a simple CTE, first compute the count of customers per city; then return cities whose count is greater than the overall average of these counts. Output: city, customer_count. Customers( customer_id NUMBER, first_name VARCHAR2(50), last_name VARCHAR2(50), city VARCHAR2(100))

For each state, show its average order amount and total orde…

For each state, show its average order amount and total orders; return only states with at least 20 orders. Output: state, avg_amount, order_count. Customers( customer_id NUMBER, state CHAR(2)) Orders( order_id NUMBER, customer_id NUMBER, total_amount NUMBER, order_date DATE)