From fdd46e034634d5cb5e87fa3609889c0b6040d1a3 Mon Sep 17 00:00:00 2001 From: Phillip Cantu Date: Fri, 12 Jun 2026 09:00:08 -0600 Subject: [PATCH] Removed Answers This practice incorrectly already included the answers. * Additonally, there is no `conn.close()`, something to consider adding. --- dsc_c1w1m3_practice2.ipynb | 70 +++----------------------------------- 1 file changed, 5 insertions(+), 65 deletions(-) diff --git a/dsc_c1w1m3_practice2.ipynb b/dsc_c1w1m3_practice2.ipynb index cf9091a..b0a95a4 100644 --- a/dsc_c1w1m3_practice2.ipynb +++ b/dsc_c1w1m3_practice2.ipynb @@ -64,18 +64,7 @@ "cell_type": "code", "source": [ "# Your code here\n", - "\n", - "q = \"\"\"\n", - "SELECT firstName, lastName, city, state\n", - "FROM employees\n", - "JOIN offices\n", - " USING(officeCode)\n", - "ORDER BY firstName, lastName\n", - ";\n", - "\"\"\"\n", - "df = pd.read_sql(q, conn)\n", - "print('Total number of results:', len(df))\n", - "df.head()\n" + "\n" ], "metadata": { "colab": { @@ -406,22 +395,7 @@ "cell_type": "code", "source": [ "# Your code here\n", - "\n", - "q = \"\"\"\n", - "SELECT\n", - " contactFirstName,\n", - " contactLastName,\n", - " orderNumber,\n", - " orderDate,\n", - " status\n", - "FROM customers\n", - "JOIN orders\n", - " USING(customerNumber)\n", - ";\n", - "\"\"\"\n", - "df = pd.read_sql(q, conn)\n", - "print('Total number of results:', len(df))\n", - "df.head()" + "\n" ], "metadata": { "colab": { @@ -759,22 +733,7 @@ "cell_type": "code", "source": [ "# Your code here\n", - "\n", - "q = \"\"\"\n", - "SELECT\n", - " contactFirstName,\n", - " contactLastName,\n", - " amount,\n", - " paymentDate\n", - "FROM customers\n", - "JOIN payments\n", - " USING(customerNumber)\n", - "ORDER BY amount DESC\n", - ";\n", - "\"\"\"\n", - "df = pd.read_sql(q, conn)\n", - "print('Total number of results:', len(df))\n", - "df.head()\n" + "\n" ], "metadata": { "colab": { @@ -1107,26 +1066,7 @@ "cell_type": "code", "source": [ "# Your code here\n", - "\n", - "q = \"\"\"\n", - "SELECT\n", - " contactFirstName,\n", - " contactLastName,\n", - " productName,\n", - " quantityOrdered,\n", - " orderDate\n", - "FROM customers\n", - "JOIN orders\n", - " USING(customerNumber)\n", - "JOIN orderdetails\n", - " USING(orderNumber)\n", - "JOIN products\n", - " USING (productCode)\n", - "ORDER BY orderDate DESC\n", - ";\"\"\"\n", - "df = pd.read_sql(q, conn)\n", - "print('Total number of results:', len(df))\n", - "df.head()\n" + "\n" ], "metadata": { "colab": { @@ -1457,4 +1397,4 @@ ] } ] -} \ No newline at end of file +}