How would you write queries that account for edge cases and output data that is immediately useful for analysis?