You can create and query SQLite databases in the command line using sqlite3. Just type:
sqlite3
And you can start using commands: you'll notice that the prompt changes to sqlite>
to reflect this.
Instructions on how to use this are available here
To quit sqlite3 press CTRL+D on the keyboard.