Practical: the SQL “GROUP BY” All of the following questions require a “GROUP BY” maybe also with a “HAVING”, All questions are based on the NASA database. Question 1. Show the number of missions...

Attatched


Practical: the SQL “GROUP BY” All of the following questions require a “GROUP BY” maybe also with a “HAVING”, All questions are based on the NASA database. Question 1. Show the number of missions flown in each year (i.e. launch Year). Order by the launch year. With the given data, the result of the (correct) query will be: Question 2. Select all projects and the number of missions in each project, for all projects with more than one mission. With the given data. Question 3. Select every astronaut who flew more than one mission. Give the name, number of missions. Question 4. Show the number of astronauts born each year. Question 5. Show the number of different craft that have flown across all missions. Question 6. Show the number of mission types that have flown across all missions. Suggested Answers. There are two errors, please find them. Do not type the answers, to see the result. Use your own knowledge of SQL to produce answers at least try. You will learn nothing if you finish the tutorial by typing the answers given. 1. Select projectname, launchyear, count(*) as Missions from nasa_mission Group by projectname, launchyear order by launchyear; 2. Select projectname, count(*) from Nasa_mission group by projectname having count(*) >1; 3. Select astroname, count(*) as Missions from Nasa_astronaut natural join Nasa_assigned group by astroName having count(*)>1; 4. Select birth, count(*) from Nasa_Astronaut group by birth; 5. Select crafttype, count(*) from Nasa_Spacecraft group by craftype; 6. Select missiontype, count(*) from Nasa_mission group by mission_type;
Sep 24, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here