id,page,ref,title,content,breadcrumbs,references sql_queries:sql-views,sql_queries,sql-views,Views,"If you want to bundle some pre-written SQL queries with your Datasette-hosted database you can do so in two ways. The first is to include SQL views in your database - Datasette will then list those views on your database index page. The quickest way to create views is with the SQLite command-line interface: sqlite3 sf-trees.db SQLite version 3.19.3 2017-06-27 16:48:08 Enter "".help"" for usage hints. sqlite> CREATE VIEW demo_view AS select qSpecies from Street_Tree_List; You can also use the sqlite-utils tool to create a view : sqlite-utils create-view sf-trees.db demo_view ""select qSpecies from Street_Tree_List""","[""Running SQL queries""]","[{""href"": ""https://sqlite-utils.datasette.io/"", ""label"": ""sqlite-utils""}, {""href"": ""https://sqlite-utils.datasette.io/en/stable/cli.html#creating-views"", ""label"": ""create a view""}]"