5.1.3.Weekly challenge 1 - sj50179/Google-Data-Analytics-Professional-Certificate GitHub Wiki

LATEST SUBMISSION GRADE 100%

Question 1

What is the goal of the analysis phase of the data analysis process?

  • To generate new data
  • To make generalizations about data
  • To identify trends and relationships in data
  • To describe data structures

Correct. In the data analysis process, the goal of analysis is to identify trends and relationships within that data so you can accurately answer the question you’re asking.

Question 2

During which of the four phases of analysis do you compare your data to external sources?

  • Organize data
  • Get input from others
  • Transform data
  • Format and adjust data

Correct. Comparing your data to external sources occurs while getting input from others.

Question 3

A data analyst is working on a dataset and begins the transform data phase of analysis. What are some of the actions that they will take? Select all that apply.

  • Performing a calculation with data
  • Finding a correlation in data
  • Sorting data
  • Filtering data

Correct. A data analyst in the transform data phase of analysis identifies relationships and patterns between data. This includes finding correlations and performing calculations on the data.

Question 4

Typically, a data analyst uses filters when they want to expand the amount of data they are working with.

  • True
  • False

Correct. Typically, a data analyst uses filters when they want to narrow down the amount of data they are working with.

Question 5

A data analyst is sorting data in a spreadsheet. They select a specific collection of cells in order to limit the sorting to just specified cells. Which spreadsheet tool are they using?

  • Sort Range
  • Limit Sort
  • Limit Range
  • Sort Sheet

Correct. Sort Range enables a data analyst to select a specific collection of cells in order to limit the sorting to just that range. Nothing else on the spreadsheet is rearranged besides the specified cells.

Question 6

A data analyst sorts a spreadsheet range between cells F19 and G82. They sort in ascending order by the second column, Column G. What is the syntax they are using?

  • =SORT(F19:G82, B, TRUE)
  • =SORT(F19:G82, 2, TRUE)
  • =SORT(F19:G82, B, FALSE)
  • =SORT(F19:G82, 2, FALSE)

Correct. The correct syntax is =SORT(F19:G82, 2, TRUE)*. The first part of the function sorts the data in the specified range. The* 2 represents the second column. And a TRUE statement sorts in ascending order.

Question 7

You are querying a database that contains data about music. Each musical genre is given an ID number. You are only interested in data related to the genre with ID number 7. The genre IDs are listed in the genre_id column.

You write the SQL query below. Add a WHERE clause that will return only data about the genre with Id number 7.

SELECT
	*
FROM
	track
WHERE
	genre_id = 7
+----------+------------------------------------------------+----------+---------------+----------+----------------------------------------------------------------+--------------+----------+------------+
| track_id | name                                           | album_id | media_type_id | genre_id | composer                                                       | milliseconds |    bytes | unit_price |
+----------+------------------------------------------------+----------+---------------+----------+----------------------------------------------------------------+--------------+----------+------------+
|      205 | Jorge Da Capadócia                             |       21 |             1 |        7 | Jorge Ben                                                      |       177397 |  5842196 |       0.99 |
|      206 | Prenda Minha                                   |       21 |             1 |        7 | Tradicional                                                    |        99369 |  3225364 |       0.99 |
|      207 | Meditação                                      |       21 |             1 |        7 | Tom Jobim - Newton Mendoça                                     |       148793 |  4865597 |       0.99 |
|      208 | Terra                                          |       21 |             1 |        7 | Caetano Veloso                                                 |       482429 | 15889054 |       0.99 |
|      209 | Eclipse Oculto                                 |       21 |             1 |        7 | Caetano Veloso                                                 |       221936 |  7382703 |       0.99 |
|      210 | Texto "Verdade Tropical"                       |       21 |             1 |        7 | Caetano Veloso                                                 |        84088 |  2752161 |       0.99 |
|      211 | Bem Devagar                                    |       21 |             1 |        7 | Gilberto Gil                                                   |       133172 |  4333651 |       0.99 |
|      212 | Drão                                           |       21 |             1 |        7 | Gilberto Gil                                                   |       156264 |  5065932 |       0.99 |
|      213 | Saudosismo                                     |       21 |             1 |        7 | Caetano Veloso                                                 |       144326 |  4726981 |       0.99 |
|      214 | Carolina                                       |       21 |             1 |        7 | Chico Buarque                                                  |       181812 |  5924159 |       0.99 |
|      215 | Sozinho                                        |       21 |             1 |        7 | Peninha                                                        |       190589 |  6253200 |       0.99 |
|      216 | Esse Cara                                      |       21 |             1 |        7 | Caetano Veloso                                                 |       223111 |  7217126 |       0.99 |
|      217 | Mel                                            |       21 |             1 |        7 | Caetano Veloso - Waly Salomão                                  |       294765 |  9854062 |       0.99 |
|      218 | Linha Do Equador                               |       21 |             1 |        7 | Caetano Veloso - Djavan                                        |       299337 | 10003747 |       0.99 |
|      219 | Odara                                          |       21 |             1 |        7 | Caetano Veloso                                                 |       141270 |  4704104 |       0.99 |
|      220 | A Luz De Tieta                                 |       21 |             1 |        7 | Caetano Veloso                                                 |       251742 |  8507446 |       0.99 |
|      221 | Atrás Da Verd-E-Rosa Só Não Vai Quem Já Morreu |       21 |             1 |        7 | David Corrêa - Paulinho Carvalho - Carlos Sena - Bira do Ponto |       307252 | 10364247 |       0.99 |
|      222 | Vida Boa                                       |       21 |             1 |        7 | Fausto Nilo - Armandinho                                       |       281730 |  9411272 |       0.99 |
|      223 | Sozinho (Hitmakers Classic Mix)                |       22 |             1 |        7 | None                                                           |       436636 | 14462072 |       0.99 |
|      224 | Sozinho (Hitmakers Classic Radio Edit)         |       22 |             1 |        7 | None                                                           |       195004 |  6455134 |       0.99 |
|      225 | Sozinho (Caêdrum 'n' Bass)                     |       22 |             1 |        7 | None                                                           |       328071 | 10975007 |       0.99 |
|      226 | Carolina                                       |       23 |             1 |        7 | None                                                           |       163056 |  5375395 |       0.99 |
|      227 | Essa Moça Ta Diferente                         |       23 |             1 |        7 | None                                                           |       167235 |  5568574 |       0.99 |
|      228 | Vai Passar                                     |       23 |             1 |        7 | None                                                           |       369763 | 12359161 |       0.99 |
|      229 | Samba De Orly                                  |       23 |             1 |        7 | None                                                           |       162429 |  5431854 |       0.99 |
+----------+------------------------------------------------+----------+---------------+----------+----------------------------------------------------------------+--------------+----------+------------+
(Output limit exceeded, 25 of 579 total rows shown)

Who is the composer listed in row 4 of your query result?

  • Gilberto Gil
  • Lulu Santos
  • Caetano Veloso
  • Marisa Monte

Correct. The clause **WHERE genre_id = 7 will return only data about the album with ID number 7. The complete query is SELECT * FROM track WHERE genre_id = 7. The WHERE clause filters results that meet certain conditions. The WHERE clause includes the name of the column, an equals sign, and the value(s) in the column to include. The composer Caetano Veloso is listed in row 4 of your query result.

Question 8

You are working with a database that contains invoice data about online music purchases. You are only interested in invoices sent to customers located in the city of Paris. You want to sort the invoices by order total in ascending order. The order totals are listed in the total column.

You write the SQL query below. Add an ORDER BY clause that will sort the invoices by order total in ascending order.

SELECT
	*
FROM
	invoice
WHERE
	billing_city = "Paris"
ORDER BY
	total
RunReset+------------+-------------+---------------------+-----------------+--------------+---------------+-----------------+---------------------+-------+
| invoice_id | customer_id | invoice_date        | billing_address | billing_city | billing_state | billing_country | billing_postal_code | total |
+------------+-------------+---------------------+-----------------+--------------+---------------+-----------------+---------------------+-------+
|        300 |          40 | 2012-08-13 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  0.99 |
|          8 |          40 | 2009-02-01 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  1.98 |
|        105 |          39 | 2010-04-11 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  1.98 |
|        323 |          39 | 2012-11-27 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  1.98 |
|        202 |          39 | 2011-06-06 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  1.99 |
|        203 |          40 | 2011-06-19 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  2.98 |
|        128 |          39 | 2010-07-14 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  3.96 |
|        226 |          40 | 2011-09-21 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  3.96 |
|        150 |          39 | 2010-10-16 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  5.94 |
|        248 |          40 | 2011-12-24 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  5.94 |
|         74 |          40 | 2009-11-12 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               |  8.91 |
|        389 |          39 | 2013-09-07 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               |  8.91 |
|         19 |          40 | 2009-03-14 00:00:00 | 8, Rue Hanovre  | Paris        |          None | France          | 75002               | 13.86 |
|        334 |          39 | 2013-01-07 00:00:00 | 4, Rue Milton   | Paris        |          None | France          | 75009               | 13.86 |
+------------+-------------+---------------------+-----------------+--------------+---------------+-----------------+---------------------+-------+

What total appears in row 6 of your query result?

  • 2.98
  • 3.96
  • 8.91
  • 0.99

Correct. The clause ORDER BY total will sort the invoices order total in ascending order. The complete query is SELECT * FROM invoice WHERE billing_city = “Paris” ORDER BY total*. The* ORDER BY clause tells the database how to organize the data it returns. The ORDER BY clause sorts data in ascending order by default. The total 2.98 appears in row 6 of your query result.