From 45410bbce51dd4e37cb75e91d0e4beb724977c7a Mon Sep 17 00:00:00 2001 From: CL Date: Wed, 5 Nov 2025 23:14:36 -0500 Subject: [PATCH] Assignment 1 complete --- .../DC_Cohort/Assignment1-CL.drawio.png | Bin 0 -> 38994 bytes .../assignments/DC_Cohort/Assignment1.md | 9 +- .../assignments/DC_Cohort/assignment1.sql | 88 ++++++++++++++++-- 3 files changed, 86 insertions(+), 11 deletions(-) create mode 100644 02_activities/assignments/DC_Cohort/Assignment1-CL.drawio.png diff --git a/02_activities/assignments/DC_Cohort/Assignment1-CL.drawio.png b/02_activities/assignments/DC_Cohort/Assignment1-CL.drawio.png new file mode 100644 index 0000000000000000000000000000000000000000..d00a6ff4aa5414cc38fde2ff03d7d377ff4b4da4 GIT binary patch literal 38994 zcmeIb1z1$u`!)>7A(RmCNQV+5qIB1QAR#aysGxKVFcLEiLzf7GD4i;;ga`sE-6bg^ zAR*n2bl1CwP|okfd;Z^h&iQ`l`g>hoI(zN4*Ise2XWdWiM;{f4Ea6G2lNcBngz|FI zsu&np8^G^UJRIO}qw|#v7#Lb4sH++%3wvXjITVALN9y1gGdHIx+#1EqBhAdst&c#k z8^QEVkop$Z?3PdzPz2o9H-TCnR#1XF!pzO}nYm^7*g1h)7t~>vMsPc8;3wn;@D~>+ zP|R}$_yyeH=RNpo&(F&Wlt>~F=1_I0fdUL@SB8&AfSrdQD88T|cSA{$nOh3@Z4NVo z0{_TD4b9-_N2E-Va0{SBhKrYr9cX(0oof2V`bgNZCeVGfg(9tCaLa>Xa0{|?vkM+{ z-r7*#9C}d9bx>jeM;bwq2SvabxS4sbGIL4-ZJ__~NF9zJxUkd*-n~CBD!>$6K71Tz zbWo&Xo8!QAD97j z_l+D5O1QWmi?Y{bDG$|jG)$s4<9^oiG;&}_KvOE@!Ln0EbOJA=IGfz zn#aQz1Hk#8Kl^Pqkl(h#|4Val8x;+N#dThYoi2}tyoTj%egV15JbVZ1XRB{+b2#T$ zfPtDGlv<-4j&Kaj6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|euRo;m>!BAqJ7~1Zv!LtO zL+QYB-w7_xxy~v}{eE4s>udxUVslHH8v+8%T1~Q+4>{?4Ybx=UF|ytY_wQu)I#M3zIjQ9k7MAa19APaJw*>tQu?P zS;Q8sKF#Un6k^8&9iYodF>5Ng{FMq z+8_qL;B5ub)rPVpULT+J5QpuVcfG1UZ{Zg}?Lm4XXZh({n;weLkWG!mWpbX*hDwhW zcU;h5lTl0!Bf0FwNO+P~ce!8odBV#4MSY9@Fh|7sImL=B_n?o@_x939}HLfK_gW4lW%KB25)9sp+SVV_0x(KwL z$AJiU!+||Ipp@JFy6?HzwD?pnMo_Ky-KnxT5zS#*S3V4px3-EEoe8Ivu{a?@z0Ce7 zzev%J?BStSJ_17pUGt+|z_zoQ9WF z>irU}sG59SUq$4U25&z;-G|8X%WW67%Ua&9#T28gD7Y$Xag#tl5>5;bQ1QV zjeFXI!8*x?+8Nh`AbV`Ft7hEMVRwA!l_*vhas(|UrlxNeO;y5N*q;(wirPoSMpinh zO+Q_3BDPT|#kY1@ICC!>Vr$idSRC#qT{sH-ac@J17|lD z+&IUcVS+fh)#jJGd&z(`1ewgZCQWyZ4u>Cm9G=@!)M}T*EWJZ`PBpj%$M8{Z`J~tv3f~?jXl44+J!+#s%Po4~BAh4tgQM9ET1%({lxeGG5aj{tLUc2o}%9*Fj*$Kz`s$(0u^y z_XdhyhD&UNf=ryh=rom|GY8f|y|OMc#C;%csUJ^oB(`g25PY`a7^jPUbP&shmJ6Kj rd&C$RdwYyy&*CsJFmTX}{scx;>;N5EJvJv$f+2quBAtFk@BaS*;lU6# literal 0 HcmV?d00001 diff --git a/02_activities/assignments/DC_Cohort/Assignment1.md b/02_activities/assignments/DC_Cohort/Assignment1.md index f78778f5b..29ca068fc 100644 --- a/02_activities/assignments/DC_Cohort/Assignment1.md +++ b/02_activities/assignments/DC_Cohort/Assignment1.md @@ -205,5 +205,12 @@ Consider, for example, concepts of fariness, inequality, social structures, marg ``` -Your thoughts... +Values embedded in databases and data systems may directly influence the societal structures and individual experiences encountered in day-to-day life, often reflecting societal norms and biases. The Wired article, When Databases Get to Define Family, show examples of this which can happen in Pakistan but may also happen in nations with centralized and powerful governments like China. As such, the design choices and underlying logic of these systems can shape access, inclusion, and marginalization for these countries. + +Fortunately, to my knowledge and experiences as a Canadian Citizen, Canada and Ontario has not had such large blockages on services if data has not been updated or expired. Necessities like health care and everyday transit would still be available to you. However, some services or allowances like not having an updated driver’s license and driving is illegal or similarly having an outdated passport and flying internationally. In other cases, like the act of voting, showing proof of address from a large variety of sources ranging from the standard driver’s license to a school transcript is sufficient. This recognizes the right to vote for people that are in the area and enables those who may not have stable housing or access to official documents. + +An interesting case in my day-to-day life would be the marketing information and the profile that has been built up over time by Google that is sold to different advertisers. The amount of information that has been built up over time as a trade off for using their services is vast and scarily accurate as they have been tracking searches, emails, clicks, and so on over large periods of time. The amount of detail was unknown to me until I have specifically requested my information, and this is crazy because I believe that if more people knew what was tracked, they would be hesitant on what is agreed upon when clicking the “I agree” button. As such, data privacy, security, and integrity come into question as a simple leak could expose many details from a huge population and it gets easier with more companies paying for access to this information. + +Although I do not currently know of many examples of fairness, inequality, social structures, and marginalization in my day-to-day life, reading about these systems will change and affect how I think about and design data systems in the future. Strategies like allowing for future modifications in case laws or views change or having policy makers or committees overseeing some aspects of data systems may be a good start. + ``` diff --git a/02_activities/assignments/DC_Cohort/assignment1.sql b/02_activities/assignments/DC_Cohort/assignment1.sql index c992e3205..3e4c4a93e 100644 --- a/02_activities/assignments/DC_Cohort/assignment1.sql +++ b/02_activities/assignments/DC_Cohort/assignment1.sql @@ -4,17 +4,19 @@ --SELECT /* 1. Write a query that returns everything in the customer table. */ - +SELECT * FROM customer; /* 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. */ - +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. */ - +SELECT * FROM customer_purchases WHERE product_id IN (4, 9); /*2. Write a query that returns all customer purchases and a new calculated column 'price' (quantity * cost_to_customer_per_qty), @@ -23,10 +25,18 @@ filtered by customer IDs between 8 and 10 (inclusive) using either: 2. one condition using BETWEEN */ -- option 1 - +SELECT + *, + (quantity * cost_to_customer_per_qty) AS price +FROM customer_purchases +WHERE customer_id >= 8 AND customer_id <= 10; -- option 2 - +SELECT + *, + (quantity * cost_to_customer_per_qty) AS price +FROM customer_purchases +WHERE customer_id BETWEEN 8 AND 10; --CASE @@ -35,20 +45,41 @@ Using the product table, write a query that outputs the product_id and product_n 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.” */ - +SELECT + product_id, + product_name, + CASE + WHEN product_qty_type = 'unit' THEN 'unit' + ELSE 'bulk' + END AS prod_qty_type_condensed +FROM product; /* 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. */ - +SELECT + product_id, + product_name, + CASE + WHEN 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 vendor_name, then market_date. */ - - +SELECT + * +FROM + vendor + INNER JOIN vendor_booth_assignments + ON vendor.vendor_id = vendor_booth_assignments.vendor_id +ORDER BY + vendor_name, + market_date; /* SECTION 3 */ @@ -56,7 +87,11 @@ vendor_id field they both have in common, and sorts the result by vendor_name, t /* 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. */ - +SELECT + vendor_id, + COUNT(vendor_id) +FROM vendor_booth_assignments +GROUP BY vendor_id; /* 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 @@ -64,6 +99,20 @@ 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. */ +SELECT + customer.customer_id, + customer.customer_last_name, + customer.customer_first_name, + SUM(quantity * cost_to_customer_per_qty) AS total_spent +FROM customer_purchases + INNER JOIN customer + ON customer_purchases.customer_id = customer.customer_id +GROUP BY + customer.customer_id +HAVING total_spent > 2000 +ORDER BY + customer_last_name, + customer_first_name; --Temp Table @@ -79,6 +128,13 @@ VALUES(col1,col2,col3,col4,col5) */ +CREATE TEMP TABLE new_vendor AS +SELECT * FROM vendor; +INSERT INTO new_vendor VALUES(10, 'Thomass Superfood Store', 'Fresh Focused', 'Thomas', 'Rosenthal'); +-- View temp table to verify +SELECT * FROM new_vendor; + + -- Date /*1. Get the customer_id, month, and year (in separate columns) of every purchase in the customer_purchases table. @@ -86,6 +142,11 @@ VALUES(col1,col2,col3,col4,col5) HINT: you might need to search for strfrtime modifers sqlite on the web to know what the modifers for month and year are! */ +SELECT + customer_id, + STRFTIME('%m', market_date) AS purchase_month, + STRFTIME('%Y', market_date) AS purchase_year +FROM customer_purchases; /* 2. Using the previous query as a base, determine how much money each customer spent in April 2022. @@ -94,3 +155,10 @@ 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!! */ +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; +