Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is my code: import pandas as pd import sqlite 3 df = pd . read _ csv ( ' Ten _ Students _ Grades.csv

This is my code:
import pandas as pd
import sqlite3
df = pd.read_csv('Ten_Students_Grades.csv')
db = sqlite3.connect("student.db")
cursor = db.cursor()
query = "CREATE TABLE IF NOT EXISTS Ten_Students(ID INT NOT NULL PRIMARY KEY, First_name TEXT, Last_name TEXT, Midterm REAL, Final REAL, Project1 REAL, Project2 REAL, Grade REAL, Letter_Grade TEXT);"
cursor.execute(query)
print(pd.read_sql('Select * from Ten_Students', db))
insert_query=''' INSERT INTO Ten_Students(ID, First_name, Last_name, Midterm, Final, Project1, Project2, Grade, Letter_Grade) values (?,?,?,?,?,?,?,?,?)'''
db.close()
how do I:
2- Write a query to insert all records by a single "INSERT" query.
3- Write a query to order students by their names (from A- Z)
4- Write a query to return number of students who received the same "Letter Grade"
5- Write a query to delete all students with Letter_Grade ="D".
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions