{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[('table',\n",
       "  'facts',\n",
       "  'facts',\n",
       "  2,\n",
       "  'CREATE TABLE \"facts\" (\"id\" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, \"code\" varchar(255) NOT NULL, \"name\" varchar(255) NOT NULL, \"area\" integer, \"area_land\" integer, \"area_water\" integer, \"population\" integer, \"population_growth\" float, \"birth_rate\" float, \"death_rate\" float, \"migration_rate\" float, \"created_at\" datetime, \"updated_at\" datetime)'),\n",
       " ('table',\n",
       "  'sqlite_sequence',\n",
       "  'sqlite_sequence',\n",
       "  3,\n",
       "  'CREATE TABLE sqlite_sequence(name,seq)')]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import sqlite3\n",
    "import pandas as pd\n",
    "\n",
    "conn = sqlite3.connect(\"factbook.db\")\n",
    "cursor = conn.cursor()\n",
    "cursor.execute(q1).fetchall()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>type</th>\n",
       "      <th>name</th>\n",
       "      <th>tbl_name</th>\n",
       "      <th>rootpage</th>\n",
       "      <th>sql</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>table</td>\n",
       "      <td>facts</td>\n",
       "      <td>facts</td>\n",
       "      <td>2</td>\n",
       "      <td>CREATE TABLE \"facts\" (\"id\" INTEGER PRIMARY KEY...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>table</td>\n",
       "      <td>sqlite_sequence</td>\n",
       "      <td>sqlite_sequence</td>\n",
       "      <td>3</td>\n",
       "      <td>CREATE TABLE sqlite_sequence(name,seq)</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    type             name         tbl_name  rootpage  \\\n",
       "0  table            facts            facts         2   \n",
       "1  table  sqlite_sequence  sqlite_sequence         3   \n",
       "\n",
       "                                                 sql  \n",
       "0  CREATE TABLE \"facts\" (\"id\" INTEGER PRIMARY KEY...  \n",
       "1             CREATE TABLE sqlite_sequence(name,seq)  "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q1 = \"SELECT * FROM sqlite_master WHERE type='table';\"\n",
    "pd.read_sql_query(q1, conn)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>area</th>\n",
       "      <th>area_land</th>\n",
       "      <th>area_water</th>\n",
       "      <th>population</th>\n",
       "      <th>population_growth</th>\n",
       "      <th>birth_rate</th>\n",
       "      <th>death_rate</th>\n",
       "      <th>migration_rate</th>\n",
       "      <th>created_at</th>\n",
       "      <th>updated_at</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1</td>\n",
       "      <td>af</td>\n",
       "      <td>Afghanistan</td>\n",
       "      <td>652230</td>\n",
       "      <td>652230</td>\n",
       "      <td>0</td>\n",
       "      <td>32564342</td>\n",
       "      <td>2.32</td>\n",
       "      <td>38.57</td>\n",
       "      <td>13.89</td>\n",
       "      <td>1.51</td>\n",
       "      <td>2015-11-01 13:19:49.461734</td>\n",
       "      <td>2015-11-01 13:19:49.461734</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2</td>\n",
       "      <td>al</td>\n",
       "      <td>Albania</td>\n",
       "      <td>28748</td>\n",
       "      <td>27398</td>\n",
       "      <td>1350</td>\n",
       "      <td>3029278</td>\n",
       "      <td>0.30</td>\n",
       "      <td>12.92</td>\n",
       "      <td>6.58</td>\n",
       "      <td>3.30</td>\n",
       "      <td>2015-11-01 13:19:54.431082</td>\n",
       "      <td>2015-11-01 13:19:54.431082</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3</td>\n",
       "      <td>ag</td>\n",
       "      <td>Algeria</td>\n",
       "      <td>2381741</td>\n",
       "      <td>2381741</td>\n",
       "      <td>0</td>\n",
       "      <td>39542166</td>\n",
       "      <td>1.84</td>\n",
       "      <td>23.67</td>\n",
       "      <td>4.31</td>\n",
       "      <td>0.92</td>\n",
       "      <td>2015-11-01 13:19:59.961286</td>\n",
       "      <td>2015-11-01 13:19:59.961286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4</td>\n",
       "      <td>an</td>\n",
       "      <td>Andorra</td>\n",
       "      <td>468</td>\n",
       "      <td>468</td>\n",
       "      <td>0</td>\n",
       "      <td>85580</td>\n",
       "      <td>0.12</td>\n",
       "      <td>8.13</td>\n",
       "      <td>6.96</td>\n",
       "      <td>0.00</td>\n",
       "      <td>2015-11-01 13:20:03.659945</td>\n",
       "      <td>2015-11-01 13:20:03.659945</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>5</td>\n",
       "      <td>ao</td>\n",
       "      <td>Angola</td>\n",
       "      <td>1246700</td>\n",
       "      <td>1246700</td>\n",
       "      <td>0</td>\n",
       "      <td>19625353</td>\n",
       "      <td>2.78</td>\n",
       "      <td>38.78</td>\n",
       "      <td>11.49</td>\n",
       "      <td>0.46</td>\n",
       "      <td>2015-11-01 13:20:08.625072</td>\n",
       "      <td>2015-11-01 13:20:08.625072</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   id code         name     area  area_land  area_water  population  \\\n",
       "0   1   af  Afghanistan   652230     652230           0    32564342   \n",
       "1   2   al      Albania    28748      27398        1350     3029278   \n",
       "2   3   ag      Algeria  2381741    2381741           0    39542166   \n",
       "3   4   an      Andorra      468        468           0       85580   \n",
       "4   5   ao       Angola  1246700    1246700           0    19625353   \n",
       "\n",
       "   population_growth  birth_rate  death_rate  migration_rate  \\\n",
       "0               2.32       38.57       13.89            1.51   \n",
       "1               0.30       12.92        6.58            3.30   \n",
       "2               1.84       23.67        4.31            0.92   \n",
       "3               0.12        8.13        6.96            0.00   \n",
       "4               2.78       38.78       11.49            0.46   \n",
       "\n",
       "                   created_at                  updated_at  \n",
       "0  2015-11-01 13:19:49.461734  2015-11-01 13:19:49.461734  \n",
       "1  2015-11-01 13:19:54.431082  2015-11-01 13:19:54.431082  \n",
       "2  2015-11-01 13:19:59.961286  2015-11-01 13:19:59.961286  \n",
       "3  2015-11-01 13:20:03.659945  2015-11-01 13:20:03.659945  \n",
       "4  2015-11-01 13:20:08.625072  2015-11-01 13:20:08.625072  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q2 = \"select * from facts limit 5\"\n",
    "pd.read_sql_query(q2, conn)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Summary Statistics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>min_pop</th>\n",
       "      <th>max_pop</th>\n",
       "      <th>min_pop_grwth</th>\n",
       "      <th>max_pop_grwth</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>7256490011</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4.02</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   min_pop     max_pop  min_pop_grwth  max_pop_grwth\n",
       "0        0  7256490011            0.0           4.02"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q3 = '''\n",
    "select min(population) min_pop, max(population) max_pop, \n",
    "min(population_growth) min_pop_grwth, max(population_growth) max_pop_grwth \n",
    "from facts\n",
    "'''\n",
    "pd.read_sql_query(q3, conn)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Outliers"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>area</th>\n",
       "      <th>area_land</th>\n",
       "      <th>area_water</th>\n",
       "      <th>population</th>\n",
       "      <th>population_growth</th>\n",
       "      <th>birth_rate</th>\n",
       "      <th>death_rate</th>\n",
       "      <th>migration_rate</th>\n",
       "      <th>created_at</th>\n",
       "      <th>updated_at</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>261</td>\n",
       "      <td>xx</td>\n",
       "      <td>World</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>7256490011</td>\n",
       "      <td>1.08</td>\n",
       "      <td>18.6</td>\n",
       "      <td>7.8</td>\n",
       "      <td>None</td>\n",
       "      <td>2015-11-01 13:39:09.910721</td>\n",
       "      <td>2015-11-01 13:39:09.910721</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id code   name  area area_land area_water  population  population_growth  \\\n",
       "0  261   xx  World  None      None       None  7256490011               1.08   \n",
       "\n",
       "   birth_rate  death_rate migration_rate                  created_at  \\\n",
       "0        18.6         7.8           None  2015-11-01 13:39:09.910721   \n",
       "\n",
       "                   updated_at  \n",
       "0  2015-11-01 13:39:09.910721  "
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q4 = '''\n",
    "select *\n",
    "from facts\n",
    "where population == (select max(population) from facts);\n",
    "'''\n",
    "\n",
    "pd.read_sql_query(q4, conn)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>code</th>\n",
       "      <th>name</th>\n",
       "      <th>area</th>\n",
       "      <th>area_land</th>\n",
       "      <th>area_water</th>\n",
       "      <th>population</th>\n",
       "      <th>population_growth</th>\n",
       "      <th>birth_rate</th>\n",
       "      <th>death_rate</th>\n",
       "      <th>migration_rate</th>\n",
       "      <th>created_at</th>\n",
       "      <th>updated_at</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>250</td>\n",
       "      <td>ay</td>\n",
       "      <td>Antarctica</td>\n",
       "      <td>None</td>\n",
       "      <td>280000</td>\n",
       "      <td>None</td>\n",
       "      <td>0</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>2015-11-01 13:38:44.885746</td>\n",
       "      <td>2015-11-01 13:38:44.885746</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    id code        name  area  area_land area_water  population  \\\n",
       "0  250   ay  Antarctica  None     280000       None           0   \n",
       "\n",
       "  population_growth birth_rate death_rate migration_rate  \\\n",
       "0              None       None       None           None   \n",
       "\n",
       "                   created_at                  updated_at  \n",
       "0  2015-11-01 13:38:44.885746  2015-11-01 13:38:44.885746  "
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q5 = '''\n",
    "select *\n",
    "from facts\n",
    "where population == (select min(population) from facts);\n",
    "'''\n",
    "\n",
    "pd.read_sql_query(q5, conn)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Histograms"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/srinify/anaconda/envs/dq/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2847: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared\n",
      "  exec(code_obj, self.user_global_ns, self.user_ns)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([[<matplotlib.axes._subplots.AxesSubplot object at 0x1138a92b0>,\n",
       "        <matplotlib.axes._subplots.AxesSubplot object at 0x1139ae6d8>],\n",
       "       [<matplotlib.axes._subplots.AxesSubplot object at 0x1139e7fd0>,\n",
       "        <matplotlib.axes._subplots.AxesSubplot object at 0x113a75c88>]], dtype=object)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAlQAAAJYCAYAAACkWnhSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+cXXV95/HXkEmI0TGN7aDr1up21U9dq+BGhcrGTGmw\nRqVx6Q9bKgpx/VGx4patIoZ210ILFmmLVNFAjPoou65IrNBSYuWHQa1Wha1Z44dC62O7a20jJhIM\noCGzf5yTMhlm5k7u9957zsx9PR8PHpx7zrnn+zk3Z77zvt9z5pyRyclJJEmS1L2jmi5AkiRpoTNQ\nSZIkFTJQSZIkFTJQSZIkFTJQSZIkFTJQSZIkFTJQDbmImIiInTPMf2dEvGqW9/xWRGyop7dGxH/p\nY30vjYh39mv7koZDRPxCRNxS8P7tEfEj9fQ3IuK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\nc4RK0kyS6vlWE1SjU9dHxNOBf8jME4HfAQ5m5kAfDC1JbeUIlaSZ/BrVE9hHgUmq5wf+H+D3IuKN\nwAPAWQ3WJ0mt4rP8JEmSCnnKT5IkqZCBSpIkqZCBSpIkqZCBSpIkqZCBSpIkqZCBSpIkqZCBSpIk\nqZCBSpIkqdD/B+1oMbOjxhXkAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x10e9238d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import seaborn as sns\n",
    "%matplotlib inline\n",
    "\n",
    "fig = plt.figure(figsize=(10,10))\n",
    "ax = fig.add_subplot(111)\n",
    "\n",
    "q6 = '''\n",
    "select population, population_growth, birth_rate, death_rate\n",
    "from facts\n",
    "where population != (select max(population) from facts)\n",
    "and population != (select min(population) from facts);\n",
    "'''\n",
    "pd.read_sql_query(q6, conn).hist(ax=ax)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Which countries have the highest population density?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>density</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Macau</td>\n",
       "      <td>21168.964286</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Monaco</td>\n",
       "      <td>15267.500000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Singapore</td>\n",
       "      <td>8141.279770</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Hong Kong</td>\n",
       "      <td>6445.041516</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Gaza Strip</td>\n",
       "      <td>5191.819444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>Gibraltar</td>\n",
       "      <td>4876.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Bahrain</td>\n",
       "      <td>1771.859211</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Maldives</td>\n",
       "      <td>1319.640940</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Malta</td>\n",
       "      <td>1310.015823</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Bermuda</td>\n",
       "      <td>1299.925926</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Sint Maarten</td>\n",
       "      <td>1167.323529</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Bangladesh</td>\n",
       "      <td>1138.069143</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>Guernsey</td>\n",
       "      <td>847.179487</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>Jersey</td>\n",
       "      <td>838.741379</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>Barbados</td>\n",
       "      <td>675.823256</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>Mauritius</td>\n",
       "      <td>656.777941</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>Taiwan</td>\n",
       "      <td>650.781712</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>Aruba</td>\n",
       "      <td>623.122222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>Lebanon</td>\n",
       "      <td>594.682788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>Saint Martin</td>\n",
       "      <td>588.037037</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            name       density\n",
       "0          Macau  21168.964286\n",
       "1         Monaco  15267.500000\n",
       "2      Singapore   8141.279770\n",
       "3      Hong Kong   6445.041516\n",
       "4     Gaza Strip   5191.819444\n",
       "5      Gibraltar   4876.333333\n",
       "6        Bahrain   1771.859211\n",
       "7       Maldives   1319.640940\n",
       "8          Malta   1310.015823\n",
       "9        Bermuda   1299.925926\n",
       "10  Sint Maarten   1167.323529\n",
       "11    Bangladesh   1138.069143\n",
       "12      Guernsey    847.179487\n",
       "13        Jersey    838.741379\n",
       "14      Barbados    675.823256\n",
       "15     Mauritius    656.777941\n",
       "16        Taiwan    650.781712\n",
       "17         Aruba    623.122222\n",
       "18       Lebanon    594.682788\n",
       "19  Saint Martin    588.037037"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q7 = \"select name, cast(population as float)/cast(area as float) density from facts order by density desc limit 20\"\n",
    "pd.read_sql_query(q7, conn)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>population</th>\n",
       "      <th>population_growth</th>\n",
       "      <th>birth_rate</th>\n",
       "      <th>death_rate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>32564342</td>\n",
       "      <td>2.32</td>\n",
       "      <td>38.57</td>\n",
       "      <td>13.89</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>3029278</td>\n",
       "      <td>0.30</td>\n",
       "      <td>12.92</td>\n",
       "      <td>6.58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>39542166</td>\n",
       "      <td>1.84</td>\n",
       "      <td>23.67</td>\n",
       "      <td>4.31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>85580</td>\n",
       "      <td>0.12</td>\n",
       "      <td>8.13</td>\n",
       "      <td>6.96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>19625353</td>\n",
       "      <td>2.78</td>\n",
       "      <td>38.78</td>\n",
       "      <td>11.49</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>92436</td>\n",
       "      <td>1.24</td>\n",
       "      <td>15.85</td>\n",
       "      <td>5.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>43431886</td>\n",
       "      <td>0.93</td>\n",
       "      <td>16.64</td>\n",
       "      <td>7.33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>3056382</td>\n",
       "      <td>0.15</td>\n",
       "      <td>13.61</td>\n",
       "      <td>9.34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>22751014</td>\n",
       "      <td>1.07</td>\n",
       "      <td>12.15</td>\n",
       "      <td>7.14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>8665550</td>\n",
       "      <td>0.55</td>\n",
       "      <td>9.41</td>\n",
       "      <td>9.42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>9780780</td>\n",
       "      <td>0.96</td>\n",
       "      <td>16.64</td>\n",
       "      <td>7.07</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>324597</td>\n",
       "      <td>0.85</td>\n",
       "      <td>15.50</td>\n",
       "      <td>7.05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>1346613</td>\n",
       "      <td>2.41</td>\n",
       "      <td>13.66</td>\n",
       "      <td>2.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>168957745</td>\n",
       "      <td>1.60</td>\n",
       "      <td>21.14</td>\n",
       "      <td>5.61</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>290604</td>\n",
       "      <td>0.31</td>\n",
       "      <td>11.87</td>\n",
       "      <td>8.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>9589689</td>\n",
       "      <td>0.20</td>\n",
       "      <td>10.70</td>\n",
       "      <td>13.36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>11323973</td>\n",
       "      <td>0.76</td>\n",
       "      <td>11.41</td>\n",
       "      <td>9.63</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>347369</td>\n",
       "      <td>1.87</td>\n",
       "      <td>24.68</td>\n",
       "      <td>5.97</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>10448647</td>\n",
       "      <td>2.78</td>\n",
       "      <td>36.02</td>\n",
       "      <td>8.21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>741919</td>\n",
       "      <td>1.11</td>\n",
       "      <td>17.78</td>\n",
       "      <td>6.69</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>10800882</td>\n",
       "      <td>1.56</td>\n",
       "      <td>22.76</td>\n",
       "      <td>6.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>3867055</td>\n",
       "      <td>0.13</td>\n",
       "      <td>8.87</td>\n",
       "      <td>9.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>2182719</td>\n",
       "      <td>1.21</td>\n",
       "      <td>20.96</td>\n",
       "      <td>13.39</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>204259812</td>\n",
       "      <td>0.77</td>\n",
       "      <td>14.46</td>\n",
       "      <td>6.58</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>429646</td>\n",
       "      <td>1.62</td>\n",
       "      <td>17.32</td>\n",
       "      <td>3.52</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>7186893</td>\n",
       "      <td>0.58</td>\n",
       "      <td>8.92</td>\n",
       "      <td>14.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>18931686</td>\n",
       "      <td>3.03</td>\n",
       "      <td>42.03</td>\n",
       "      <td>11.72</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>56320206</td>\n",
       "      <td>1.01</td>\n",
       "      <td>18.39</td>\n",
       "      <td>7.96</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>10742276</td>\n",
       "      <td>3.28</td>\n",
       "      <td>42.01</td>\n",
       "      <td>9.27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>15708756</td>\n",
       "      <td>1.58</td>\n",
       "      <td>23.83</td>\n",
       "      <td>7.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>210</th>\n",
       "      <td>112162</td>\n",
       "      <td>1.33</td>\n",
       "      <td>12.56</td>\n",
       "      <td>8.18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>211</th>\n",
       "      <td>148406</td>\n",
       "      <td>0.43</td>\n",
       "      <td>13.80</td>\n",
       "      <td>8.20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>212</th>\n",
       "      <td>39689</td>\n",
       "      <td>1.51</td>\n",
       "      <td>13.00</td>\n",
       "      <td>4.51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>213</th>\n",
       "      <td>9838</td>\n",
       "      <td>2.95</td>\n",
       "      <td>14.33</td>\n",
       "      <td>8.03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>214</th>\n",
       "      <td>1190</td>\n",
       "      <td>0.03</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>215</th>\n",
       "      <td>1337</td>\n",
       "      <td>0.01</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>216</th>\n",
       "      <td>1872</td>\n",
       "      <td>0.03</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>217</th>\n",
       "      <td>15700</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>218</th>\n",
       "      <td>16418</td>\n",
       "      <td>2.03</td>\n",
       "      <td>12.67</td>\n",
       "      <td>4.57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>219</th>\n",
       "      <td>70196</td>\n",
       "      <td>0.50</td>\n",
       "      <td>11.33</td>\n",
       "      <td>8.23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>220</th>\n",
       "      <td>33454</td>\n",
       "      <td>2.32</td>\n",
       "      <td>10.91</td>\n",
       "      <td>4.99</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>221</th>\n",
       "      <td>56092</td>\n",
       "      <td>2.10</td>\n",
       "      <td>12.11</td>\n",
       "      <td>5.53</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>222</th>\n",
       "      <td>15700</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>223</th>\n",
       "      <td>3361</td>\n",
       "      <td>0.01</td>\n",
       "      <td>10.90</td>\n",
       "      <td>4.90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>224</th>\n",
       "      <td>29258</td>\n",
       "      <td>0.24</td>\n",
       "      <td>14.08</td>\n",
       "      <td>8.37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>225</th>\n",
       "      <td>66080</td>\n",
       "      <td>0.34</td>\n",
       "      <td>9.84</td>\n",
       "      <td>8.78</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>226</th>\n",
       "      <td>97294</td>\n",
       "      <td>0.80</td>\n",
       "      <td>11.91</td>\n",
       "      <td>7.68</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>227</th>\n",
       "      <td>87545</td>\n",
       "      <td>0.76</td>\n",
       "      <td>11.10</td>\n",
       "      <td>10.06</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>228</th>\n",
       "      <td>5241</td>\n",
       "      <td>0.50</td>\n",
       "      <td>11.26</td>\n",
       "      <td>6.30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>229</th>\n",
       "      <td>48</td>\n",
       "      <td>0.00</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>230</th>\n",
       "      <td>7795</td>\n",
       "      <td>0.24</td>\n",
       "      <td>9.88</td>\n",
       "      <td>7.44</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>231</th>\n",
       "      <td>50280</td>\n",
       "      <td>2.30</td>\n",
       "      <td>16.13</td>\n",
       "      <td>3.10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>232</th>\n",
       "      <td>54343</td>\n",
       "      <td>0.30</td>\n",
       "      <td>22.89</td>\n",
       "      <td>4.75</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>233</th>\n",
       "      <td>161785</td>\n",
       "      <td>0.54</td>\n",
       "      <td>16.82</td>\n",
       "      <td>5.12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>234</th>\n",
       "      <td>52344</td>\n",
       "      <td>2.18</td>\n",
       "      <td>18.32</td>\n",
       "      <td>3.71</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>235</th>\n",
       "      <td>3598357</td>\n",
       "      <td>0.60</td>\n",
       "      <td>10.86</td>\n",
       "      <td>8.67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>236</th>\n",
       "      <td>103574</td>\n",
       "      <td>0.59</td>\n",
       "      <td>10.31</td>\n",
       "      <td>8.54</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>237</th>\n",
       "      <td>1869055</td>\n",
       "      <td>2.81</td>\n",
       "      <td>31.11</td>\n",
       "      <td>3.04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>238</th>\n",
       "      <td>2785366</td>\n",
       "      <td>1.95</td>\n",
       "      <td>22.99</td>\n",
       "      <td>3.50</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>239</th>\n",
       "      <td>570866</td>\n",
       "      <td>2.82</td>\n",
       "      <td>30.24</td>\n",
       "      <td>8.34</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>240 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     population  population_growth  birth_rate  death_rate\n",
       "0      32564342               2.32       38.57       13.89\n",
       "1       3029278               0.30       12.92        6.58\n",
       "2      39542166               1.84       23.67        4.31\n",
       "3         85580               0.12        8.13        6.96\n",
       "4      19625353               2.78       38.78       11.49\n",
       "5         92436               1.24       15.85        5.69\n",
       "6      43431886               0.93       16.64        7.33\n",
       "7       3056382               0.15       13.61        9.34\n",
       "8      22751014               1.07       12.15        7.14\n",
       "9       8665550               0.55        9.41        9.42\n",
       "10      9780780               0.96       16.64        7.07\n",
       "11       324597               0.85       15.50        7.05\n",
       "12      1346613               2.41       13.66        2.69\n",
       "13    168957745               1.60       21.14        5.61\n",
       "14       290604               0.31       11.87        8.44\n",
       "15      9589689               0.20       10.70       13.36\n",
       "16     11323973               0.76       11.41        9.63\n",
       "17       347369               1.87       24.68        5.97\n",
       "18     10448647               2.78       36.02        8.21\n",
       "19       741919               1.11       17.78        6.69\n",
       "20     10800882               1.56       22.76        6.52\n",
       "21      3867055               0.13        8.87        9.75\n",
       "22      2182719               1.21       20.96       13.39\n",
       "23    204259812               0.77       14.46        6.58\n",
       "24       429646               1.62       17.32        3.52\n",
       "25      7186893               0.58        8.92       14.44\n",
       "26     18931686               3.03       42.03       11.72\n",
       "27     56320206               1.01       18.39        7.96\n",
       "28     10742276               3.28       42.01        9.27\n",
       "29     15708756               1.58       23.83        7.68\n",
       "..          ...                ...         ...         ...\n",
       "210      112162               1.33       12.56        8.18\n",
       "211      148406               0.43       13.80        8.20\n",
       "212       39689               1.51       13.00        4.51\n",
       "213        9838               2.95       14.33        8.03\n",
       "214        1190               0.03         NaN         NaN\n",
       "215        1337               0.01         NaN         NaN\n",
       "216        1872               0.03         NaN         NaN\n",
       "217       15700                NaN         NaN         NaN\n",
       "218       16418               2.03       12.67        4.57\n",
       "219       70196               0.50       11.33        8.23\n",
       "220       33454               2.32       10.91        4.99\n",
       "221       56092               2.10       12.11        5.53\n",
       "222       15700                NaN         NaN         NaN\n",
       "223        3361               0.01       10.90        4.90\n",
       "224       29258               0.24       14.08        8.37\n",
       "225       66080               0.34        9.84        8.78\n",
       "226       97294               0.80       11.91        7.68\n",
       "227       87545               0.76       11.10       10.06\n",
       "228        5241               0.50       11.26        6.30\n",
       "229          48               0.00         NaN         NaN\n",
       "230        7795               0.24        9.88        7.44\n",
       "231       50280               2.30       16.13        3.10\n",
       "232       54343               0.30       22.89        4.75\n",
       "233      161785               0.54       16.82        5.12\n",
       "234       52344               2.18       18.32        3.71\n",
       "235     3598357               0.60       10.86        8.67\n",
       "236      103574               0.59       10.31        8.54\n",
       "237     1869055               2.81       31.11        3.04\n",
       "238     2785366               1.95       22.99        3.50\n",
       "239      570866               2.82       30.24        8.34\n",
       "\n",
       "[240 rows x 4 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q7 = '''select population, population_growth, birth_rate, death_rate\n",
    "from facts\n",
    "where population != (select max(population) from facts)\n",
    "and population != (select min(population) from facts);\n",
    "'''\n",
    "pd.read_sql_query(q7, conn)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
