Write complex SQL queries involving multiple joins, aggregations, and subqueries to retrieve specific transactional data.