SQL Assessment questions
Note:
Please be advised that these assessment inquiries are designed to accommodate interns with diverse skill levels,
ranging from novices to seasoned analysts. Should you encounter any challenging questions, you are encouraged to
seek solutions independently or reach out to us for assistance at intern@[Link]. Best wishes for success
in completing the assessment!
Tools needed :- MS SQL
1. Define a SQL table to store information about space missions.
2. Add records for at least three space missions conducted by different companies.
3. Retrieve the names of all rockets used in space missions.
4. Display the details of space missions launched by a specific company.
5. Retrieve the top 5 most expensive rockets based on their cost.
6. Calculate the average cost of all rockets.
7. Group the missions by launch location and display the total count of missions for each location.
8. Create a new table for rocket details and join it with the main table to display mission names and their
corresponding rocket names.
9. Find the company that conducted the most expensive mission.
10. Calculate the total cost of successful missions.
11. Change the status of rockets to 'Inactive' for those whose mission status is 'Prelaunch Failure'.
12. Add a new record for a space mission with necessary details.
13. Remove all records where the mission status is 'Failure'.
14. Create a new column 'Mission_Result' that categorizes missions as 'Successful', 'Partial Success', or
'Failed' based on their mission status.
15. Rank the missions based on their launch date within each company.
16. Calculate the running total of the number of missions conducted by each company.
17. Create a CTE that lists companies along with the count of their successful missions.
1|Page
18. Pivot the data to show the total count of missions for each company and their mission statuses.
19. Unpivot the table to transform the 'Mission_Result' column into a single column named 'Result'.
20. Create a stored procedure that accepts a location as input and returns the total count of missions
launched from that location
2|Page