Unfortunately, in QGIS 3.2, the functionality to run SQL queries against GeoPakages has not been fully developed as of yet in the DBManager. To carry on exploring SQL queries, we are going to focus on SpatiaLite. To do this, we first need to connect to a SpatiaLite database, which can be found in your Chapter 3, Creating Spatial Databases, samples download.
In the Browser
panel tab, right-click on SpatiaLite
and choose New Connection
. Navigate to open_data.sqlite
from the Chapter 3, Creating Spatial Databases, samples.
Once connected, you can expand the open_data
database and see the layers and tables stored within it.
Open the DBManager
(Database
| DBManager
), navigate to SpatiaLite
in the tree, find the open_data
database, and then click on it and expand it so that you can see all of the tables within it. Click on the SQL Window
icon.
In the new tab called Query
(open_data.sqlite
), you can start to perform queries.
Let's start with our first...