SQLite Shell confusion

Screen Link: https://app.dataquest.io/m/192/table-relations-and-normalization/1/the-sqlite-shell

My issue is that I’m literally copying and pasting what is in the assignment but the shell is telling me that there is an error in my code. Since it’s code written by the assignment, this is impossible. What might be wrong?

I also do not understand why it seems that you cannot delete text you write in the command line shell. Is this normal? I can’t edit ANYTHING I write… HELP PLEASE!!!

Thank you for editing @Sahil. Can you be a bit more helpful? I would like to continue using your program, but this makes it impossible.

1 Like

Hi @Willyjgolden,

Sorry for the confusion, the edit is done automatically whenever the student adds a screen link to their post. The purpose of the edit is to make it easier for students to find relevant topics for a specific mission or screen. For example:


#  sqlite3> .tables
#  sqlite3> .headers on
#  sqlite3> .mode column
#  sqlite3> SELECT
#      ...>   track_id,
#      ...>   name,
#      ...>   album_id
#      ...> FROM track
#      ...> WHERE album_id = 3;
#  sqlite3> .help
#  sqlite3> .shell clear
#  sqlite3> .quit

The solution code of this screen cannot be copy-pasted. This is because it contains # sqlite3> on each line. The # character is a workaround for our terminal screens to work the way we intended it to be and is not part of the actual solution and sqlite3> is a prompt you get automatically once you run
sqlite3 command.

So the solution code for this screen is designed for typing manually. In any case, if you wish to copy paste, then you can try this code:

sqlite3 chinook.db <<EOF
.headers on
.mode column
 FROM track
 WHERE album_id = 3;
.shell clear

Heredoc (<<EOF) is not a concept we have taught in our command line missions. You can read more about it here:

Let me know if you have any further questions about it.


The arrow keys aren’t working for me either and it makes it very cumbersome to edit stuff. Is this a function of the way this shell is produced by DQ or is this how SQLite operates in the real world?