Question: how to extract data from sqlite database?
Answer: Turn on the header of the result set using the . header on command.
Set the output mode to CSV to instruct the sqlite3 tool to issue the result in the CSV mode.
Send the output to a CSV file.
Issue the query to select data from the table to which you want to export.