How would you write a SQL query to join multiple transactional tables and aggregate user metrics over a specific time window?