adjustment to query scopr for pg production