add detail query