Analyze factbook using SQL

hi everyone,

I have one question about analyzing factbook using SQL. when I download the [SQLite factbook.db database], I try to run the code below which is a copy. however, my Jupiter notebook didn’t have any reflection. I know the right result should be"‘Connected: [email protected]’".
can you tell me what the problems for my code?
%load_ext sql
%sql sqlite:///factbook.db

1 Like


Run this on your first cell:

%load_ext sql
%sql sqlite:///factbook.db

Run this on your second cell

    FROM sqlite_master
    WHERE type='table';

If a table shows up, then it is working.

It is important that you have the factbook.db in the same folder as the python file that you are running. Also, remember the %%sql at the top of each cell.