cmc/data-science

Personal data science learning files.

clone: git clone https://gitbay.org/cmc/data-science.git

main: projects/sqlite3-analysis/README.md · raw

 1## Instructions
 2
 3```bash
 4# Open the database:
 5sqlite3 ./chinook.db
 6```
 7
 8```sql
 9-- Enable some features and export the CSV results of the script
10.headers on
11.mode csv
12.output /home/cmc/git/data-science/projects/sql-dashboard/employee_sales.csv
13.read employee_sales.sql
14```
15
16```bash
17# Inspect the results
18cat ./employee_sales.csv
19```
20
21```csv
22EmployeeId,LastName,FirstName,Title,CustomerId,SupportRepId,State,Country,InvoiceId,CustomerId,InvoiceDate,InvoiceId,UnitPrice,Quantity,TotalPrice
233,Peacock,Jane,"Sales Support Agent",1,3,SP,Brazil,98,1,"2010-03-11 00:00:00",98,1.99,1,1.99
244,Park,Margaret,"Sales Support Agent",4,4,,Norway,2,4,"2009-01-02 00:00:00",2,0.99,1,0.99
255,Johnson,Steve,"Sales Support Agent",2,5,,Germany,1,2,"2009-01-01 00:00:00",1,0.99,1,0.99
26```