Managed to extract data from query