define the reset-db! query as a single long query