applied data science capstone coursera week 2 quiz answers

Check Points: Exploratory Analysis Using SQL

1. Have you loaded the SQL extension and establish a connection with the SQLIte database ?

  • Yes
  • No

2. Have you loaded SpaceX dataset into SQLIte Table?

  • Yes
  • No

3. Have you used SQL queries with the SQL magic commands in Python to perform EDA?

  • Yes
  • No

Exploratory Data Analysis using SQL

4. Which of the following will retrieve upto 20 records from the spacex table?

  • SELECT TOP 20 rows from SPACEXTBL
  • SELECT * from SPACEXTBL MAX 20
  • SELECT * from SPACEXTBL where count(*)=20
  • SELECT * from SPACEXTBL LIMIT 20

5. Which of the following queries display the minimum payload mass?

  • select payload_mass__kg_ from SPACEXTBL order by payload_mass__kg_ desc LIMIT 1
  • select min(payload_mass__kg_) from SPACEXTBL
  • select payload_mass__kg_ from SPACEXTBL order by payload_mass__kg_ group by booster_version LIMIT 1
  • select payload_mass__kg_ from SPACEXTBL where payload_mass__kg_=(select max(payload_mass__kg_) from SPACEXTBL) LIMIT 1

6. You are writing a query that will give you the total payload_mass_kg carried by the booster versions. The mass should be stored in the mass column. You want the result column to be called “Total_Payload_Mass”. Which of the following SQL queries is correct?

  • SELECT sum(PAYLOAD_MASS__KG_) from SPACEXTBL
  • SELECT sum(PAYLOAD_MASS__KG_) as Total_Payload_Mass from SPACEXTBL
  • SELECT count(PAYLOAD_MASS__KG_) as Total_Payload_Mass from SPACEXTBL

7. Which of the following query is used to display the mission outcome counts for each launch site?

  • select count(“Mission_Outcome”) as MISSION_OUTCOME_COUNT,Launch_Site from SPACEXTBL group by “Launch_Site”;
  • select sum(“Mission_Outcome”) as MISSION_OUTCOME_COUNT,Launch_Site from SPACEXTBL group by “Launch_Site”;

8. What are the unique launch sites mentioned in the Spacex table?

  • None of the Above
  • CCAS LC-40,KSC LC-39A,VAFB SLC-4E , CCAFS SLC-80
  • CCAFS LC-40,KSC LC-39B,VAFB SLC-4k , CCAFS SLC-40
  • CCAFS LC-40,KSC LC-39A, VAFB SLC-4E , CCAFS SLC-40

Shuffle Q/A 1

Check Points: Complete the EDA with Visualization

9. Did you Visualize the relationship between different parameters?

  • Yes
  • No

10. Did you visualize the launch success yearly trend?

  • Yes
  • No

Leave a Reply