CREATE TABLE customer_orders (order_id NUMBER, customer_id NUMBER, order_status_code CLOB, order_date TIME)
CREATE TABLE product_suppliers (product_id NUMBER, supplier_id NUMBER, date_supplied_from TIME, date_supplied_to TIME, total_amount_purchased CLOB, total_value_purchased NUMBER)
CREATE TABLE customers (customer_id NUMBER, payment_method_code CLOB, customer_code CLOB, customer_name CLOB, customer_address CLOB, customer_phone CLOB, customer_email CLOB)
CREATE TABLE order_items (order_item_id NUMBER, order_id NUMBER, product_id NUMBER)
CREATE TABLE addresses (address_id NUMBER, address_details CLOB)
CREATE TABLE suppliers (supplier_id NUMBER, supplier_name CLOB, supplier_phone CLOB)
CREATE TABLE products (product_id NUMBER, product_type_code CLOB, product_name CLOB, product_price NUMBER)
CREATE TABLE staff_department_assignments (staff_id NUMBER, department_id NUMBER, date_assigned_from TIME, job_title_code CLOB, date_assigned_to TIME)
CREATE TABLE department_store_chain (dept_store_chain_id NUMBER, dept_store_chain_name CLOB)
CREATE TABLE department_stores (dept_store_id NUMBER, dept_store_chain_id NUMBER, store_name CLOB, store_address CLOB, store_phone CLOB, store_email CLOB)
CREATE TABLE supplier_addresses (supplier_id NUMBER, address_id NUMBER, date_from TIME, date_to TIME)
CREATE TABLE staff (staff_id NUMBER, staff_gender CLOB, staff_name CLOB)
CREATE TABLE customer_addresses (customer_id NUMBER, address_id NUMBER, date_from TIME, date_to TIME)
CREATE TABLE departments (department_id NUMBER, dept_store_id NUMBER, department_name CLOB)

What are the distinct names of customers with an order status of Pending, sorted by customer id?
SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = "Pending" ORDER BY T2.customer_id
SELECT DISTINCT "T1"."customer_name" FROM "customers" "T1" JOIN "customer_orders" "T2" ON "Pending" = "T2"."order_status_code" AND "T1"."customer_id" = "T2"."customer_id" ORDER BY "T2"."customer_id"