Function returns similar queries