TASK:
- Create a database instance, table and insert records into the table
NOTE: The record values for the table are to be retrieved from a csv file in the zip file data.rar
SOLUTION:(Done in Google Colab)
File: DB programming.ipynb
Steps Involved;
- Download the (zip) file, unzip and copy .csv file into your working directory. Read it in.
Interested in only two fields; 'Countries' and '2017 vs 1990: change(%)'
Do any relevant transformations. - Using SQL,
- Create a database instance.
- Create a table named Emmission with two fields named country and %_change(1990-2017)
- From the selected columns, Insert relevant records into the two fields of the table Emmission and save the changes.
- Sort the table; with the country with the highest %_change(1990-2017) on top.
- Display only the top 10 countries.
- Plot a graph.
The clip below shows the steps and code running;