gai93003 / My-Coursework-Planner

0 stars 0 forks source link

[TECH ED] SQL Problems using Google Sheets #31

Open gai93003 opened 3 weeks ago

gai93003 commented 3 weeks ago

Link to the coursework

https://docs.google.com/spreadsheets/d/1zPeHxhKkYmdiqXNhMwhfC1A0o1wI0zNiD5Gsks2SYoc/template/preview

Why are we doing this?

To practice how to use Google Sheets to store and query data. This should make sure we understand the basics of SQL and how to use it to query data.

We're going to practice extracting data from a database, using SQL. We will use the same data set we used in the Learn about Google Sheets coursework.

Please complete the following tasks:

  1. Emily Smith would like to be able to quickly see how many deals she's made. She only cares about Deal Value and Expected Close date to see when she'll be paid. Create a query that will give only this information.
  2. As the accountant working for this business, I need to work out the total sales we've made in each country to pay our taxes. Write a query to return a list of each closed deal (they have status of "Closed Won") and sort them by country so we can work this out easily.
  3. As the accountant for this business, I need to find out how much we’ve sold in each country to pay our taxes. Deals are only complete when they have the status "Closed Won", so we should only include those deals. To make the data easier to work with, we can sort them by country. Can you write a query to get this information?

Acceptance criteria

Maximum time in hours

1

How to get help

Share your blockers in the ITP Slack.

How to submit

  1. The work should be in the same Google Sheet as the "Learn about Google Sheets" coursework.
  2. Share a link to your Google Sheet. Make sure to give read access to your sheet, you can do this by clicking the "Share" button, then change "Restricted" to "Anyone with the link".
gai93003 commented 3 weeks ago

Hello, I have completed this project and would love if someone would review it for me. https://docs.google.com/spreadsheets/d/1kk2mbS_TMaYrt51FUkRNUI0qVon1FJPplf_KOqVJj-U/edit?usp=sharing

cjyuan commented 3 weeks ago

Comments for Query Data in Google Sheets with SQL

Comments for SQL Problems using Google Sheets

gai93003 commented 2 weeks ago

Thanks CJ, I will try to change that.

On Fri, 1 Nov 2024 at 05:16, CJ Yuan @.***> wrote:

1.

In the "All Sheets combined" sheet, your query is combining data from sheets with different column numbers and column structures, which in practice does not make much sense. Can you try to combine just the data in "Sales_data" and "Sales_data2"? 2.

Your Google sheet seems to contain some "irrelevant" worksheets. I couldn't quite make sense of the data in the sheet.

— Reply to this email directly, view it on GitHub https://github.com/gai93003/My-Coursework-Planner/issues/31#issuecomment-2451309232, or unsubscribe https://github.com/notifications/unsubscribe-auth/BC3JQE6PKIOIXK3EYVMAMCTZ6MFEHAVCNFSM6AAAAABQUDYZFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRGMYDSMRTGI . You are receiving this because you were assigned.Message ID: @.***>

gai93003 commented 2 weeks ago

I have remove all other worksheets leaving only three sheets; Sales_data1, Sales_data2 and All Sheets combined. I hope that is ok.

On Fri, 1 Nov 2024 at 21:03, Deng @.***> wrote:

Thanks CJ, I will try to change that.

On Fri, 1 Nov 2024 at 05:16, CJ Yuan @.***> wrote:

1.

In the "All Sheets combined" sheet, your query is combining data from sheets with different column numbers and column structures, which in practice does not make much sense. Can you try to combine just the data in "Sales_data" and "Sales_data2"? 2.

Your Google sheet seems to contain some "irrelevant" worksheets. I couldn't quite make sense of the data in the sheet.

— Reply to this email directly, view it on GitHub https://github.com/gai93003/My-Coursework-Planner/issues/31#issuecomment-2451309232, or unsubscribe https://github.com/notifications/unsubscribe-auth/BC3JQE6PKIOIXK3EYVMAMCTZ6MFEHAVCNFSM6AAAAABQUDYZFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJRGMYDSMRTGI . You are receiving this because you were assigned.Message ID: @.***>

cjyuan commented 2 weeks ago

I hope you still have the other sheets. All except the empty one are relevant.

cjyuan commented 2 weeks ago

The acceptance criteria is: I have watched the SQL in Google Sheets video and followed along with the instructions in my own Google Sheet. So to my understanding the Google sheet should have the query illustrated in each of these video segments (one sheet for each query). 01:43 Simple QUERY example 02:41 SELECT A, B vs SELECT Col1, Col2 03:10 WHERE clause 03:33 Multiple WHERE conditions 04:21 ORDER BY clause 04:47 GROUP BY clause and aggregation 06:51 Combine data from multiple sheets

gai93003 commented 2 weeks ago

Yeah, I do have the google sheet with the rest of the sheets. I have updated the link to the sheet in the google doc

On Sat, 2 Nov 2024 at 16:38, CJ Yuan @.***> wrote:

The acceptance criteria is: I have watched the SQL in Google Sheets video and followed along with the instructions in my own Google Sheet. So to my understanding the Google sheet should have the query illustrated in each of these video segments (one sheet for each query). 01:43 https://www.youtube.com/watch?v=dTNamL30sDg&t=103s Simple QUERY example 02:41 https://www.youtube.com/watch?v=dTNamL30sDg&t=161s SELECT A, B vs SELECT Col1, Col2 03:10 https://www.youtube.com/watch?v=dTNamL30sDg&t=190s WHERE clause 03:33 https://www.youtube.com/watch?v=dTNamL30sDg&t=213s Multiple WHERE conditions 04:21 https://www.youtube.com/watch?v=dTNamL30sDg&t=261s ORDER BY clause 04:47 https://www.youtube.com/watch?v=dTNamL30sDg&t=287s GROUP BY clause and aggregation 06:51 https://www.youtube.com/watch?v=dTNamL30sDg&t=411s Combine data from multiple sheets

— Reply to this email directly, view it on GitHub https://github.com/gai93003/My-Coursework-Planner/issues/31#issuecomment-2453042714, or unsubscribe https://github.com/notifications/unsubscribe-auth/BC3JQE4NV3SEECFXOPBCKILZ6T5XDAVCNFSM6AAAAABQUDYZFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGA2DENZRGQ . You are receiving this because you were assigned.Message ID: @.***>