Show the invoice number of each transaction.
select invoice_number from financial_transactions
Also show the invoice date.
select t2.invoice_number, t2.invoice_date from financial_transactions as t1 join invoices as t2 on t1.invoice_number = t2.invoice_number
Also show the number of transactions for each of them.
select t2.invoice_number, t2.invoice_date, count(*) from financial_transactions as t1 join invoices as t2 on t1.invoice_number = t2.invoice_number group by t1.invoice_number
Which one has the most transactions?
select t2.invoice_number, t2.invoice_date from financial_transactions as t1 join invoices as t2 on t1.invoice_number = t2.invoice_number group by t1.invoice_number order by count(*) desc limit 1