From 83c026932406ec96644b185b7b10d640a0c7b611 Mon Sep 17 00:00:00 2001 From: Nico Sarian Date: Mon, 30 Mar 2026 18:36:59 -0400 Subject: [PATCH] All changes pushed --- .../assignments/DC_Cohort/Assignment1.md | 54 +++--- .../assignments/DC_Cohort/Assignment2.md | 18 +- 02_activities/assignments/DC_Cohort/ERD.pdf | Bin 0 -> 29226 bytes .../assignments/DC_Cohort/assignment1.sql | 171 ++++++++++-------- .../assignments/DC_Cohort/assignment2.sql | 74 +------- 5 files changed, 127 insertions(+), 190 deletions(-) create mode 100644 02_activities/assignments/DC_Cohort/ERD.pdf diff --git a/02_activities/assignments/DC_Cohort/Assignment1.md b/02_activities/assignments/DC_Cohort/Assignment1.md index f650c9752..76fdc5abb 100644 --- a/02_activities/assignments/DC_Cohort/Assignment1.md +++ b/02_activities/assignments/DC_Cohort/Assignment1.md @@ -1,13 +1,12 @@ -# DC Assignment 1: Meet the farmersmarket.db and Basic SQL +# Assignment 1: Meet the farmersmarket.db and Basic SQL 🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly. #### Submission Parameters: -* Submission Due Date: `March 31, 2026` +* Submission Due Date: `November 17, 2025` * Weight: 30% of total grade * The branch name for your repo should be: `assignment-one` * What to submit for this assignment: - * This markdown (Assignment1.md) with written responses in Section 4 * One Entity-Relationship Diagram (preferably in a pdf, jpeg, png format). * One .sql file * What the pull request link should look like for this assignment: `https://github.com//sql/pulls/` @@ -115,7 +114,7 @@ Steps to complete this part of the assignment: - Open the assignment1.sql file in DB Browser for SQLite: - from [Github](./02_activities/assignments/assignment1.sql) - or, from your local forked repository -- Complete each question, by writing responses between the QUERY # and END QUERY blocks +- Complete each question ### Write SQL @@ -126,11 +125,10 @@ Steps to complete this part of the assignment:
-
#### WHERE -1. Write a query that returns all customer purchases of product IDs 4 and 9. Limit to 25 rows of output. +1. Write a query that returns all customer purchases of product IDs 4 and 9. 2. Write a query that returns all customer purchases and a new calculated column 'price' (quantity * cost_to_customer_per_qty), filtered by customer IDs between 8 and 10 (inclusive) using either: 1. two conditions using AND 2. one condition using BETWEEN -Limit to 25 rows of output.
-
@@ -142,7 +140,7 @@ Limit to 25 rows of output.
-
#### JOIN -1. Write a query that `INNER JOIN`s the `vendor` table to the `vendor_booth_assignments` table on the `vendor_id` field they both have in common, and sorts the result by `market_date` then `vendor_name`. Limit to 24 rows of output. +1. Write a query that `INNER JOIN`s the `vendor` table to the `vendor_booth_assignments` table on the `vendor_id` field they both have in common, and sorts the result by `vendor_name`, then `market_date`. *** @@ -153,7 +151,7 @@ Steps to complete this part of the assignment: - Open the assignment1.sql file in DB Browser for SQLite: - from [Github](./02_activities/assignments/assignment1.sql) - or, from your local forked repository -- Complete each question, by writing responses between the QUERY # and END QUERY blocks +- Complete each question ### Write SQL @@ -180,34 +178,36 @@ To insert the new row use VALUES, specifying the value you want for each column: **HINT**: you might need to search for strfrtime modifers sqlite on the web to know what the modifers for month and year are! -Limit to 25 rows of output. - 2. Using the previous query as a base, determine how much money each customer spent in April 2022. Remember that money spent is `quantity*cost_to_customer_per_qty`. -**HINTS**: you will need to AGGREGATE, GROUP BY, and filter...but remember, STRFTIME returns a STRING for your WHERE statement... -AND be sure you remove the LIMIT from the previous query before aggregating!! +**HINTS**: you will need to AGGREGATE, GROUP BY, and filter...but remember, STRFTIME returns a STRING for your WHERE statement!! + + + + +## Section 4: What values systems are embedded in databases and data systems you encounter in your day-to-day life? + +I would suggest that the values that one encounters in databases and data systems in the quotidian are either unassuming/uncritical, and or naively determined. By the latter, I imply that most value systems, with their varying hermeneutical destinations, are not simply willed or agenticaly assumed, but rather possessive and deterministic. One does not chose which ideas or indexes to follow, one simply deploys oneself with these not in mind. One can read, on can study, however, behaviour tends not to follow the fantasies and the petulations, whether intellectual or political, that one may entertain. Rather, one is compelled to act with what is in engraved in what counts as the actions and the decisions that are actually relevant, that is those that are done in the horizon of fear and uncertainty. I believe, that what is considered as a "technical worker", those professionals in either the hard sciences or in the digital professions, such as as Computer Science or Data Science, are not nearly unaware of the unassuming values. More emphatically I deem that they are either untrained in carrying critical injunctions, and more affirmatively the shouldn't. To use an analogy to stress my point, a knife is a "piece" of technology. A good knife is defined by its ability to cut properly. One can use as knife to cut bread or to stab someone. The knife itself is not bad, it is good because it cuts and its stab. Stabbing is normatively negative and punishable. Therefore the function of the knife, as the function of database/data system, is contingent on the user, not the maker of the knife. A technical maker (the creator of the database as the creator of the knife) cannot "code" in a function into the knife, he or she can only strive to make it sharp. In that regard, whatever system of values is coded into the tool is naively determined. At the end of the day, the function of database/data system is determined by the barer, not by the maker. In that, whatever values are "embedded" in databases sufferer in their irrelevance, from the naiveté of their designer. + + + + + + + + + + + + + -*** -## Section 4: -You can start this section anytime. -Steps to complete this part of the assignment: -- Read the article -- Write, within this markdown file, between 250 and 1000 words. No additional citations/sources are required. -### Ethics -Read: Qadri, R. (2021, November 11). _When Databases Get to Define Family._ Wired.
- https://www.wired.com/story/pakistan-digital-database-family-design/ -Link if you encounter a paywall: https://archive.is/srKHV or https://web.archive.org/web/20240422105834/https://www.wired.com/story/pakistan-digital-database-family-design/ -**What values systems are embedded in databases and data systems you encounter in your day-to-day life?** -Consider, for example, concepts of fariness, inequality, social structures, marginalization, intersection of technology and society, etc. -``` -Your thoughts... -``` diff --git a/02_activities/assignments/DC_Cohort/Assignment2.md b/02_activities/assignments/DC_Cohort/Assignment2.md index 01f991d02..e2bcf8ec4 100644 --- a/02_activities/assignments/DC_Cohort/Assignment2.md +++ b/02_activities/assignments/DC_Cohort/Assignment2.md @@ -1,9 +1,9 @@ -# DC Assignment 2: Design a Logical Model and Advanced SQL +# Assignment 2: Design a Logical Model and Advanced SQL 🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly. #### Submission Parameters: -* Submission Due Date: `April 07, 2026` +* Submission Due Date: `November 12, 2025` * Weight: 70% of total grade * The branch name for your repo should be: `assignment-two` * What to submit for this assignment: @@ -40,8 +40,6 @@ Design a logical model for a small bookstore. 📚 At the minimum it should have employee, order, sales, customer, and book entities (tables). Determine sensible column and table design based on what you know about these concepts. Keep it simple, but work out sensible relationships to keep tables reasonably sized. Additionally, include a date table. -A date table (also called a calendar table) is a permanent table containing a list of dates and various components of those dates. Some theory, tips, and commentary can be found [here](https://www.sqlshack.com/designing-a-calendar-table/), [here](https://www.mssqltips.com/sqlservertip/4054/creating-a-date-dimension-or-calendar-table-in-sql-server/) and [here](https://sqlgeekspro.com/creating-calendar-table-sql-server/). -Remember, you don't actually need to run any of the queries in these articles, but instead understand *why* date tables in SQL make sense, and how to situate them within your logical models. There are several tools online you can use, I'd recommend [Draw.io](https://www.drawio.com/) or [LucidChart](https://www.lucidchart.com/pages/). @@ -68,7 +66,7 @@ Steps to complete this part of the assignment: - Open the assignment2.sql file in DB Browser for SQLite: - from [Github](./02_activities/assignments/assignment2.sql) - or, from your local forked repository -- Complete each question, by writing responses between the QUERY # and END QUERY blocks +- Complete each question ### Write SQL @@ -97,16 +95,10 @@ You can either display all rows in the customer_purchases table, with the counte **HINT**: One of these approaches uses ROW_NUMBER() and one uses DENSE_RANK(). -Filter the visits to dates before April 29, 2022. - -2. Reverse the numbering of the query so each customer’s most recent visit is labeled 1, then write another query that uses this one as a subquery (or temp table) and filters the results to only the customer’s most recent visit. -**HINT**: Do not use the previous visit dates filter. +2. Reverse the numbering of the query from a part so each customer’s most recent visit is labeled 1, then write another query that uses this one as a subquery (or temp table) and filters the results to only the customer’s most recent visit. 3. Using a COUNT() window function, include a value along with each row of the customer_purchases table that indicates how many different times that customer has purchased that product_id. -You can make this a running count by including an ORDER BY within the PARTITION BY if desired. -Filter the visits to dates before April 29, 2022. -
-
#### String manipulations @@ -136,7 +128,7 @@ Steps to complete this part of the assignment: - Open the assignment2.sql file in DB Browser for SQLite: - from [Github](./02_activities/assignments/assignment2.sql) - or, from your local forked repository -- Complete each question, by writing responses between the QUERY # and END QUERY blocks +- Complete each question ### Write SQL diff --git a/02_activities/assignments/DC_Cohort/ERD.pdf b/02_activities/assignments/DC_Cohort/ERD.pdf new file mode 100644 index 0000000000000000000000000000000000000000..d1c1dd6ad1bd1dea52da408f42a4dea823adca60 GIT binary patch literal 29226 zcmeFY2Ut`~(=d3*NhIf-QIcc@1j!&GC?FXwnE_#x97YB~auN_wxFm@ZCFh(}Kr%>X z1`{AKgE|Z_414g6-+S-(|M&TK_t|~^-PWE{^y$-G)m^8mx~h(lv6ha6w4^Mh(BP+o zPdjDb3nmALDP?)D@IoCuC{wO157cCbjsIv>N)GZfpH$Qh?1w~#} zRZ3q!9~TEN${+$UQ*u*L(<^`m6%i4MfF?uKOVg+aQ7R;-;j=G4&PJq74{}Dmyj8&d zRE0cZHvH>H8w-F5MW`ujM!`0~pAtw9s&?FZiX|p5P3~|ta2Ju>70UNGfxxy1VKL-9ADgSs#%EaH%?-y~uCg7Dahd6_)dyb}* zo(sgy9VAp*4jdRH%I5*}d?R@MeEeM~r8J@Up*|)L9GqNu6@JYqr2+BtHFojQgnB)I zdY>=R)qn1mjH0}}!oN0DOVjl4+xf3OJo|9A0npym(boY82mnA2{0E#NfE(ID5LW;& zGz2aK06-29#6SRI5CXdZ>|g}|!UDp7v=H$Y5d8xN=Fe}Q?E+Vg-JyO^Uw7yOURlX2 zz*P->L*nxh!14lS!O8c5y0P)C^D+N%{WbnSe=zgEa0g~2 z&c{-EwsrT^C%TH6opiy;U%>vK-ToY)bawG|0&n5KD(UpV#}8ZxaS%2R^m}j)!$6qP z2Sf^lpPs{Re}jw9VaLD0t-t!1-qi&AjDaw%le>d62(N&!xZ}UIyZsyNb>IJd-t%(4 z@)umZ%}l^6Jy|0V^19_|MYJ`R5y5Bw#-5c|5y%KZA9fLR0pC?wC$wp0LsDgor6)w46K z&Dq&WB><3#0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=j_|Jz(nL&&a2ycRpH-; zP7==y&%K6g+?R0MD``YUSNq5lcjRgmDNrRkIt*tNo-eOGc{|bF-tk#Uzu;C)Go#5* z4Vo{?Q-99q0si8Hk6nB(r^^;H(lzft6FPV*Y8&cq+RZig65{RHo_(y*4-b~=9DF8{qpWyMYI77u4uhK`^G4)uGri7k(_dnxAzOxTK-%&!Tyo; zrSAE6I;gHRzsexin^uXcvK8*@j*-hww$sMF>y13Co9&_aO`$%H*uRe2cVOFh9vlFd z0}yA&oB~~4q`!~kIcbOAS#;m=c7H_1eW%|A{+VY7QP+@$9?<|WbjH3I0Qsgat!j>R z2?Vfp-|=}sdp}Udnkb1ye_y-T~$PaG-cz7-tXMhGM@9pGl zbzb_CYd|2<*GF1iTLq$`E^RM=41@G?k=D>MJ)&l>Abl3&6o3wu2GDuG^7yc51>gz+ zRv;R9&v9UO^2s09)lk!bsA+1dX{c*zX+iDO)D8hppq_=V%l9hM|8zG7TMVC_wxBLmBWw1NheeRHpHhdYTY` zE%=9eKzqPX>(6ECYQP};sUAcd80bHhLDhf>@p~CMzzON)8t^NC@jNor75Hob<Ja-YUt=dj_}FJnOL3R`+xe`#+v{D literal 0 HcmV?d00001 diff --git a/02_activities/assignments/DC_Cohort/assignment1.sql b/02_activities/assignments/DC_Cohort/assignment1.sql index 2ec561e2a..d4fb4a975 100644 --- a/02_activities/assignments/DC_Cohort/assignment1.sql +++ b/02_activities/assignments/DC_Cohort/assignment1.sql @@ -1,52 +1,47 @@ - /* ASSIGNMENT 1 */ ---Please write responses between the QUERY # and END QUERY blocks +/* ASSIGNMENT 1 */ /* SECTION 2 */ --SELECT /* 1. Write a query that returns everything in the customer table. */ ---QUERY 1 +SELECT * +FROM customer; - - ---END QUERY - - -/* 2. Write a query that displays all of the columns and 10 rows from the customer table, +/* 2. Write a query that displays all of the columns and 10 rows from the cus- tomer table, sorted by customer_last_name, then customer_first_ name. */ ---QUERY 2 - - - - ---END QUERY +SELECT * +FROM customer +ORDER BY customer_last_name, customer_first_name +LIMIT 10; --WHERE -/* 1. Write a query that returns all customer purchases of product IDs 4 and 9. -Limit to 25 rows of output. */ ---QUERY 3 - - - - ---END QUERY - +/* 1. Write a query that returns all customer purchases of product IDs 4 and 9. */ +SELECT * +FROM customer_purchases +WHERE product_id IN (4, 9) +LIMIT 25; /*2. Write a query that returns all customer purchases and a new calculated column 'price' (quantity * cost_to_customer_per_qty), filtered by customer IDs between 8 and 10 (inclusive) using either: 1. two conditions using AND 2. one condition using BETWEEN -Limit to 25 rows of output. */ ---QUERY 4 - +-- option 1 +SELECT *, + quantity * cost_to_customer_per_qty AS price +FROM customer_purchases +WHERE customer_id >= 8 AND customer_id <= 10 +LIMIT 25; - - ---END QUERY +-- option 2 +SELECT *, + quantity * cost_to_customer_per_qty AS price +FROM customer_purchases +WHERE customer_id BETWEEN 8 AND 10 +LIMIT 25; --CASE @@ -54,35 +49,43 @@ Limit to 25 rows of output. Using the product table, write a query that outputs the product_id and product_name columns and add a column called prod_qty_type_condensed that displays the word “unit” if the product_qty_type is “unit,” and otherwise displays the word “bulk.” */ ---QUERY 5 - +SELECT + product_id, + product_name, + CASE + WHEN product_qty_type = 'unit' THEN 'unit' + ELSE 'bulk' + END AS prod_qty_type_condensed +FROM product; ---END QUERY - - /* 2. We want to flag all of the different types of pepper products that are sold at the market. add a column to the previous query called pepper_flag that outputs a 1 if the product_name contains the word “pepper” (regardless of capitalization), and otherwise outputs 0. */ ---QUERY 6 - - - - ---END QUERY +SELECT + product_id, + product_name, + CASE + WHEN product_qty_type = 'unit' THEN 'unit' + ELSE 'bulk' + END AS prod_qty_type_condensed, + CASE + WHEN LOWER(product_name) LIKE '%pepper%' THEN 1 + ELSE 0 + END AS pepper_flag +FROM product; --JOIN /* 1. Write a query that INNER JOINs the vendor table to the vendor_booth_assignments table on the -vendor_id field they both have in common, and sorts the result by market_date, then vendor_name. -Limit to 24 rows of output. */ ---QUERY 7 - - - - ---END QUERY +vendor_id field they both have in common, and sorts the result by vendor_name, then market_date. */ +SELECT * +FROM vendor +INNER JOIN vendor_booth_assignments + ON vendor.vendor_id = vendor_booth_assignments.vendor_id +ORDER BY market_date, vendor_name +LIMIT 24; @@ -91,25 +94,31 @@ Limit to 24 rows of output. */ -- AGGREGATE /* 1. Write a query that determines how many times each vendor has rented a booth at the farmer’s market by counting the vendor booth assignments per vendor_id. */ ---QUERY 8 - - - - ---END QUERY +SELECT + v.vendor_id, + v.vendor_name, + COUNT(*) AS booth_rental_count +FROM vendor v +INNER JOIN vendor_booth_assignments vba + ON v.vendor_id = vba.vendor_id +GROUP BY v.vendor_id, v.vendor_name; /* 2. The Farmer’s Market Customer Appreciation Committee wants to give a bumper sticker to everyone who has ever spent more than $2000 at the market. Write a query that generates a list of customers for them to give stickers to, sorted by last name, then first name. - HINT: This query requires you to join two tables, use an aggregate function, and use the HAVING keyword. */ ---QUERY 9 - - - - ---END QUERY +SELECT + c.customer_id, + c.customer_first_name, + c.customer_last_name, + SUM(cp.quantity * cp.cost_to_customer_per_qty) AS total_spent +FROM customer c +INNER JOIN customer_purchases cp + ON c.customer_id = cp.customer_id +GROUP BY c.customer_id, c.customer_first_name, c.customer_last_name +HAVING total_spent > 2000 +ORDER BY c.customer_last_name, c.customer_first_name; --Temp Table @@ -123,37 +132,39 @@ When inserting the new vendor, you need to appropriately align the columns to be -> To insert the new row use VALUES, specifying the value you want for each column: VALUES(col1,col2,col3,col4,col5) */ ---QUERY 10 - - - +CREATE TABLE new_vendor AS +SELECT * +FROM vendor; +SELECT * FROM new_vendor; +INSERT INTO new_vendor +VALUES (10, 'Thomass Superfood Store', 'Fresh Focused', 'Thomas', 'Rosenthal'); ---END QUERY -- Date /*1. Get the customer_id, month, and year (in separate columns) of every purchase in the customer_purchases table. HINT: you might need to search for strfrtime modifers sqlite on the web to know what the modifers for month -and year are! -Limit to 25 rows of output. */ ---QUERY 11 - - - - ---END QUERY +and year are! */ +SELECT + customer_id, + strftime('%m', market_date) AS month, + strftime('%Y', market_date) AS year +FROM customer_purchases; /* 2. Using the previous query as a base, determine how much money each customer spent in April 2022. Remember that money spent is quantity*cost_to_customer_per_qty. HINTS: you will need to AGGREGATE, GROUP BY, and filter... -but remember, STRFTIME returns a STRING for your WHERE statement... -AND be sure you remove the LIMIT from the previous query before aggregating!! */ ---QUERY 12 - +but remember, STRFTIME returns a STRING for your WHERE statement!! */ +SELECT + customer_id, + SUM(quantity * cost_to_customer_per_qty) AS total_spent +FROM customer_purchases +WHERE strftime('%m', market_date) = '04' + AND strftime('%Y', market_date) = '2022' +GROUP BY customer_id; ---END QUERY diff --git a/02_activities/assignments/DC_Cohort/assignment2.sql b/02_activities/assignments/DC_Cohort/assignment2.sql index f7515f625..d6a10dbe0 100644 --- a/02_activities/assignments/DC_Cohort/assignment2.sql +++ b/02_activities/assignments/DC_Cohort/assignment2.sql @@ -1,5 +1,4 @@ /* ASSIGNMENT 2 */ ---Please write responses between the QUERY # and END QUERY blocks /* SECTION 2 */ -- COALESCE @@ -21,14 +20,9 @@ nulls, and 'unit' for the second column with nulls. The `||` values concatenate the columns into strings. Edit the appropriate columns -- you're making two edits -- and the NULL rows will be fixed. All the other rows will remain the same. */ ---QUERY 1 - ---END QUERY - - --Windowed Functions /* 1. Write a query that selects from the customer_purchases table and numbers each customer’s visits to the farmer’s market (labeling each market date with a different number). @@ -37,41 +31,21 @@ Each customer’s first visit is labeled 1, second visit is labeled 2, etc. You can either display all rows in the customer_purchases table, with the counter changing on each new market date for each customer, or select only the unique market dates per customer (without purchase details) and number those visits. -HINT: One of these approaches uses ROW_NUMBER() and one uses DENSE_RANK(). -Filter the visits to dates before April 29, 2022. */ ---QUERY 2 - - +HINT: One of these approaches uses ROW_NUMBER() and one uses DENSE_RANK(). */ ---END QUERY - -/* 2. Reverse the numbering of the query so each customer’s most recent visit is labeled 1, +/* 2. Reverse the numbering of the query from a part so each customer’s most recent visit is labeled 1, then write another query that uses this one as a subquery (or temp table) and filters the results to -only the customer’s most recent visit. -HINT: Do not use the previous visit dates filter. */ ---QUERY 3 - - +only the customer’s most recent visit. */ ---END QUERY - /* 3. Using a COUNT() window function, include a value along with each row of the -customer_purchases table that indicates how many different times that customer has purchased that product_id. - -You can make this a running count by including an ORDER BY within the PARTITION BY if desired. -Filter the visits to dates before April 29, 2022. */ ---QUERY 4 +customer_purchases table that indicates how many different times that customer has purchased that product_id. */ - ---END QUERY - - -- String manipulations /* 1. Some product names in the product table have descriptions like "Jar" or "Organic". These are separated from the product name with a hyphen. @@ -83,21 +57,11 @@ Remove any trailing or leading whitespaces. Don't just use a case statement for | Habanero Peppers - Organic | Organic | Hint: you might need to use INSTR(product_name,'-') to find the hyphens. INSTR will help split the column. */ ---QUERY 5 - - ---END QUERY - /* 2. Filter the query to show any product_size value that contain a number with REGEXP. */ ---QUERY 6 - - - ---END QUERY -- UNION @@ -109,15 +73,10 @@ HINT: There are a possibly a few ways to do this query, but if you're struggling "best day" and "worst day"; 3) Query the second temp table twice, once for the best day, once for the worst day, with a UNION binding them. */ ---QUERY 7 ---END QUERY - - - /* SECTION 3 */ -- Cross Join @@ -130,48 +89,28 @@ Remember, CROSS JOIN will explode your table rows, so CROSS JOIN should likely b Think a bit about the row counts: how many distinct vendors, product names are there (x)? How many customers are there (y). Before your final group by you should have the product of those two queries (x*y). */ ---QUERY 8 - - ---END QUERY - -- INSERT /*1. Create a new table "product_units". This table will contain only products where the `product_qty_type = 'unit'`. It should use all of the columns from the product table, as well as a new column for the `CURRENT_TIMESTAMP`. Name the timestamp column `snapshot_timestamp`. */ ---QUERY 9 - - - ---END QUERY /*2. Using `INSERT`, add a new row to the product_units table (with an updated timestamp). This can be any product you desire (e.g. add another record for Apple Pie). */ ---QUERY 10 - ---END QUERY - - -- DELETE /* 1. Delete the older record for the whatever product you added. HINT: If you don't specify a WHERE clause, you are going to have a bad time.*/ ---QUERY 11 - - ---END QUERY - -- UPDATE /* 1.We want to add the current_quantity to the product_units table. @@ -189,12 +128,7 @@ Third, SET current_quantity = (...your select statement...), remembering that WH Finally, make sure you have a WHERE statement to update the right row, you'll need to use product_units.product_id to refer to the correct row within the product_units table. When you have all of these components, you can run the update statement. */ ---QUERY 12 - - - ---END QUERY