@@ -20,22 +20,22 @@ SHOW TABLES;
20
20
You can query the tables using SQL, e.g. using the example queries from sakila-examples.sql
21
21
22
22
``` sql
23
- SELECT cat .name category_name,
24
- Sum (Ifnull(pay .amount , 0 )) revenue
25
- FROM category cat
26
- LEFT JOIN film_category flm_cat
27
- ON cat .category_id = flm_cat .category_id
28
- LEFT JOIN film fil
29
- ON flm_cat .film_id = fil .film_id
30
- LEFT JOIN inventory inv
31
- ON fil .film_id = inv .film_id
32
- LEFT JOIN rental ren
33
- ON inv .inventory_id = ren .inventory_id
34
- LEFT JOIN payment pay
35
- ON ren .rental_id = pay .rental_id
36
- GROUP BY cat .name
37
- ORDER BY revenue DESC
38
- LIMIT 5 ;
23
+ SELECT cat .name category_name,
24
+ Sum (Ifnull(pay .amount , 0 )) revenue
25
+ FROM category cat
26
+ LEFT JOIN film_category flm_cat
27
+ ON cat .category_id = flm_cat .category_id
28
+ LEFT JOIN film fil
29
+ ON flm_cat .film_id = fil .film_id
30
+ LEFT JOIN inventory inv
31
+ ON fil .film_id = inv .film_id
32
+ LEFT JOIN rental ren
33
+ ON inv .inventory_id = ren .inventory_id
34
+ LEFT JOIN payment pay
35
+ ON ren .rental_id = pay .rental_id
36
+ GROUP BY cat .name
37
+ ORDER BY revenue DESC
38
+ LIMIT 5 ;
39
39
```
40
40
41
41
## Opening SQLite Databases Directly
@@ -45,7 +45,7 @@ SQLite databases can also be opened directly and can be used transparently inste
45
45
For example, with the shell:
46
46
47
47
``` sql
48
- $ > duckdb data/ db/ sakila .db
48
+ $ > duckdb data/ db/ sakila .db
49
49
v0 .9 .1 401c8061c6
50
50
D SHOW tables;
51
51
┌────────────────────────┐
@@ -95,10 +95,10 @@ INSERT INTO sqlite_db.tbl VALUES (42, 'DuckDB');
95
95
The resulting SQLite database can then be read into from SQLite.
96
96
97
97
``` sql
98
- $r > sqlite3 new_sqlite_database .db
98
+ $r > sqlite3 new_sqlite_database .db
99
99
SQLite version 3 .39 .5 2022 - 10 - 14 20 :58 :05
100
100
sqlite> SELECT * FROM tbl;
101
- id name
101
+ id name
102
102
-- ------
103
103
42 DuckDB
104
104
```
@@ -183,7 +183,7 @@ SELECT * FROM sqlite_db.tmp;
183
183
184
184
## Building & Loading the Extension
185
185
186
- To build, type
186
+ To build, type
187
187
```
188
188
make
189
189
```
@@ -197,4 +197,3 @@ Then, load the SQLite extension like so:
197
197
``` SQL
198
198
LOAD ' build/release/extension/sqlite_scanner/sqlite_scanner.duckdb_extension' ;
199
199
```
200
-
0 commit comments