Data visualization learning (2)------Visualization practice of Excel or ECharts (sakila database)

First, mysql loads the Sakila sample database

  • Download: http://downloads.mysql.com/docs/sakila-db.tar.gz
  • Unzip: Put the unzipped files into a directory
  • Use the following command in mysql:
  • > source E:/sakila-schema.sql;(此处为自己的安装路径)
    
  •  >source E:/sakila-data.sql;(注意路径上的名称为英文,改成“\”)
    
  • select count(*) from custormer; if hundreds of records are displayed, the import is successful
    insert image description hereinsert image description hereinsert image description here

Second, get data

  • Using SQL statements, connect the customer_list table and the payment table to get the consumption amount of each consumer in each city
  • select city,country from country,city,customer where country.country_id=city.country_id and city.city_id=customer.address_id;
    insert image description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326526213&siteId=291194637