![]() | |
Project 3: Assigned: Fri Sep 20 2024 In this project, you'll implement many search queries in SQL, effecively replacing some old Python functions. The functions in this project shouldn't take the database connection as a parameter and should return just a single string that contains the query. I'll test that your code works by running the query myself. You can test things yourself by using this tester script, though it does not contain all the tests that I will use; it does not guarantee a score. Part 0, 10 points: Write a python function, get_biggest_area_lake_query(), that returns a string containing an SQL query that will return a single result that is the name of the lake with the biggest surface area. If you want to improve your old code, replace your get_biggest_area_lake() function from Project 0 to call this query. Part 1, 10 points: Write a python function, get_deepest_lake_query(), that returns an SQL query that returns a the name of the deepest lake. This can also be used to replace one of your previous functions. Part 2, 5 points: Let's keep going. Write the appropriate get_biggest_volume_lake_query(). Part 3, 10 points: Next: get_highest_average_depth_lake_query. This one is slightly harder, so it's worth more points. Slightly. Part 4, 10 points: Next: get_most_southern_lake_query() Part 5, 10 points: Next: get_number_of_big_lakes_query(). This query should always return a tuple that contains a single number. Part 6, 10 points: get_number_west_query will take a single parameter: the longitude (number, not string) to compare with. Part 7, 5 points: The last one to implement from Project 0 is get_deepest_western_lakes_query(). For this one, you'll need to use an alias as part of your search. Part 8, 10 points: Let's include some new queries using our gator_sightings table. Write get_most_gators_sighted_query(), which returns the lake that has had the most gators in one sighting. Part 9, 10 points: Write get_gator_lakes_query(), which returns the names of all lakes that have had gator sightings. Part 10, 10 points: Write get_most_gators_by_lake_query(), which returns pairs (lake name, num gators) where each pair contains the most gators that have been spotted in that lake. Submitting your Project: Choose a team name that no other team will choose. Then make sure all your code is in a file labelled with your team name, followed by |