I want to add a PostGIS SELECT query as a new layer to a QGIS 3 project using the Python console. It is a simple process to do this using the SQL Window in the DB Manager of QGIS. Here you can create a layer from any SQL query of a PostGIS enabled PostgreSQL database. The following works for adding