Detail the data preparation and querying