Show the max amount of transactions for different lots.
select max(amount_of_transaction) from transactions
What is the average amount of transactions for all lots?
select avg(amount_of_transaction) from transactions
What is the average amount of transactions for the lot with id 1?
select t2.lot_id, avg(amount_of_transaction) from transactions as t1 join transactions_lots as t2 on t1.transaction_id = t2.transaction_id where t2.lot_id = 1 group by t2.lot_id
Show the average amount of transactions for all different lots.
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