I have a QGIS project that generates a layer with point geometry from a database (Excel sheet) that I load directly into QGIS. To this table a join is established with a common field of a GPKG point geometry layer.
The virtual layer is created with the option Layer / Add layer / Add-Edit virtual layer and use MakePoint(longitude, latitude, CRS) to create the geometry:
SELECT myID,
myField,
MakePoint(myLong,myLat,3857) as geometry
FROM myTable
The point geometry layer is created as expected. The problem appears when I want to recover (open) the project after having closed it. There seems to be some problem retrieving the query.
I have added an animated screenshot that tries to show the workflow: