sql: few fixes
qgis project