GithubHelp home page GithubHelp logo

djsahu / databasessqlfordatasci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lisaover/databasessqlfordatasci

0.0 0.0 0.0 426 KB

Databases and SQL for Data Science by IBM on Coursera

Jupyter Notebook 99.38% TSQL 0.62%

databasessqlfordatasci's Introduction

DatabasesSQLforDataSci

Databases and SQL for Data Science by IBM on Coursera

The hands-on labs for this course uses the IBM Cloud environment for working with a relational database. The database is created and accessed with IBM Db2 from the web browser.

basic_sql_commands.sql

This script contains basic sql commands for dropping tables, creating tables (with a primary key), inserting data into tables, and updating tables in the Db2 IBM Cloud database.

sql_functions_pet_sale.ipynb

This script uses python to create and populate a pet sale table in the Db2 IBM Cloud database and to query the table with built-in functions including AVG, SUM, MAX, ROUND, COUNT, LENGTH, LCASE, UCASE, DISTINCT, CAST, DAY, MONTH, and CURRENT DATE.

HR Database

This folder contains scripts for querying an HR database with advanced SQL commands.

  • HR Database Tables.pdf illustrates the structure of the HR database.
  • Script_Create_Tables.sql contains the code for creating the 5 HR database tables.
  • Script_Query_HR_1.sql contains SQL queries with LIKE, BETWEEN, WHERE, ORDER BY, GROUP BY, COUNT, AVG, and HAVING clauses. It also contains a query that uses aliases and extracts information from two tables.
  • Script_Query_HR_2.sql contains SQL queries with JOIN operations.

The data for the HR database was loaded into the Db2 database from CSV files.

Db Access with Python

This folder contains Jupyter Notebook scripts that connect to and query an IBM Db2 database.

  • Connecting_to_Db.ipynb connects to a Db2 database on IBM Cloud using Python.
  • Querying_Db.ipynb accesses a Db2 database on IBM Cloud using Python. This script also creates a table, inserts data, queries the data, and retrieves a result set into a Pandas data frame.
  • SQL_magic.ipynb uses SQL Magic to accesse a Db2 database on IBM Cloud using Python. This script also uses SQL Magic to create a table, insert data, query the data, and retrieve a result set into a Pandas data frame.
  • Analyzing_data.ipynb stores a dataset into a database from a .CSV file using Python. This script also queries and analyzes the data using SQL and Python.

Chicago School Progress

This folder contains the Chicago Public School Progress Report files. This lab involved working with a real word dataset using SQL and Python to query columns with spaces or special characters in their names and with mixed names. It also required the use of built in database functions.

  • CPS Progress Report 2011-12.csv is the dataset showing all school-level performance data used to create CPS School Report Cards for the 2011-2012 school year. The data was loaded into a Db2 database on IBM Cloud.
  • CPS_reportcard_data_description.pdf contains descriptions of the report card dataset CPS Progress Report 2011-12.csv
  • Chicago_school_progress.ipynb contains the scripts used to connect to and query the database.

Final Course Assignment

This folder contains data files and a Jupyter Notebook script that demonstrates use of a variety of SQL commands to query the three datasets.

  • Census_Data.csv contains six socioeconomic indicators of public health significance and a “hardship index,” by Chicago community area, for the years 2008 – 2012. For more detailed information, see the data description.
  • Chicago_Crime_Data.csv reflects reported incidents of crime (with the exception of murders where data exists for each victim) that occurred in the City of Chicago from 2001 to present, minus the most recent seven days. For more detailed information, see the data description.
  • Chicago_Public_Schools.csv shows all school level performance data used to create CPS School Report Cards for the 2011-2012 school year. For more detailed information, see the data description.
  • Final_course_assignment.ipynb contains the script with ipython-sql code, which is used to query the datasets after they were loaded into a Db2 database on IBM Cloud.

databasessqlfordatasci's People

Contributors

lisaover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.