nic base query