Question: The data above is stored in a database table called sets, with column names matching the field names in thie csv file. The table has

The data above is stored in a database table called sets, with column names matching the field names in thie csv file. The table has been created using this SQL command: CREATE TABLE IF NOT EXIST sets (set_num, name, year, theme_id, num_parts) Define a Python function getYearSorteByName that accepts both a database cursor and a number representing a year. This function must return a list of the database rows which match the given year, sorted by the name of the set. To do this you will need to define a function that selects the value in the name column as the key for sorting. Remember that name is in column 1. Assuming that cur and year are the names of the parameters for the database cursor and year respectively, you can use this call to execute to select the correct rows: cur.execute('SELECT * FROM sets WHERE year=?',year)

This is in Python. Please help me !

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!