Question: Show the average amount of transactions for different lots, ordered by average amount of transactions.
Schema: create table transactions (transaction_id varchar, PRIMARY KEY (transaction_id)); create table transactions_lots (lot_id varchar, transaction_id varchar, PRIMARY KEY (lot_id))
SQL: select t2.lot_id, avg(amount_of_transaction) from transactions as t1 join transactions_lots as t2 on t1.transaction_id = t2.transaction_id group by t2.lot_id order by avg(amount_of_transaction)