def trail(self):
inner = (self.get_query()<EOL>.select(PageView.ip, PageView.url)<EOL>.order_by(PageView.timestamp))<EOL>return (PageView<EOL>.select(<EOL>PageView.ip,<EOL>fn.array_agg(PageView.url).alias('<STR_LIT>'))<EOL>.from_(inner.alias('<STR_LIT>'))<EOL>.group_by(PageView.ip))<EOL>
Get all visitors by IP and then list the pages they visited in order.