Add prepared query