Write a query to rank data, calculate running totals, or identify gaps in time-series data at Barclays.