-- Database schema
| Addresses : address_id [ INT ] primary_key , address_content [ TEXT ] , city [ TEXT ] , zip_postcode [ TEXT ] , state_province_county [ TEXT ] , country [ TEXT ] , other_address_details [ TEXT ] | Products : product_id [ INT ] primary_key , product_details [ TEXT ] | Customers : customer_id [ INT ] primary_key , payment_method [ TEXT ] , customer_name [ TEXT ] , date_became_customer [ TEXT ] , other_customer_details [ TEXT ] | Customer_Addresses : customer_id [ INT ] Customer_Addresses.customer_id = Customers.customer_id , address_id [ INT ] Customer_Addresses.address_id = Addresses.address_id , date_address_from [ TEXT ] , address_type [ TEXT ] , date_address_to [ TEXT ] | Customer_Contact_Channels : customer_id [ INT ] Customer_Contact_Channels.customer_id = Customers.customer_id , channel_code [ TEXT ] , active_from_date [ TEXT ] , active_to_date [ TEXT ] , contact_number [ TEXT ] | Customer_Orders : order_id [ INT ] primary_key , customer_id [ INT ] Customer_Orders.customer_id = Customers.customer_id , order_status [ TEXT ] , order_date [ TEXT ] , order_details [ TEXT ] | Order_Items : order_id [ INT ] Order_Items.order_id = Customer_Orders.order_id , product_id [ INT ] Order_Items.product_id = Products.product_id , order_quantity [ TEXT ] |
-- -- What is the payment method of the customer that has purchased the least quantity of items?

SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1;