I am using following Command to connect oracle cloud instance 19c using Oracle Cloud Shell
sqlplus username/password@db
It shows following error
SQL*Plus: Release 19.0.0.0.0 - Production on ******* Version 19.5.0.0.0 Copyright (c) 1982, 2019, Oracle. All rights reserved. ERROR: ORA-12154: TNS:could not resolve the connect identifier specified
The Cloud Shell isn't connected to your VCNs - it will need to access your database through internet. For this to happen, you'll need to open your database's listener port to the internet, and this is a "VERY BAD IDEA" generally speaking. Best is to create a VM instance in the same VCN and connect to the DB from the VM.
If you want to eliminate all the intermediate layers for your test, even the local VCN network, then you can connect directly to the DB node using ssh and emit your select from there.