File size: 854 Bytes
c560f8b
 
 
 
 
 
 
 
4ba67c7
c560f8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import sqlite3
def setup_database():
    conn = sqlite3.connect('sfdc_la.db')
    cursor = conn.cursor()
    cursor.execute('''
    CREATE TABLE IF NOT EXISTS sfdc_la (
        LAid TEXT PRIMARY KEY,
        Amount REAL,
        Tenure INTEGER,
        ROI REAL,
        Stage VARCHAR
    )
    ''')
    #inserting data into table
    loan_data = [
        ('LA00001', 10000, 12, 5.5, 'Customer Onboarding'),
        ('LA00002', 15000, 24, 6.0, 'Credit Review'),
        ('LA00003', 20000, 36, 6.5, 'Loan Disbursal'),
        ('LA23455', 25000, 48, 7.0, 'OTC Clearance'),
        ('LA00005', 30000, 60, 7.5, 'Customer Onboarding')
    ]
    cursor.executemany('''
    INSERT INTO sfdc_la (LAid, Amount, Tenure, ROI, Stage)
    VALUES (?, ?, ?, ?, ?)
    ''', loan_data)
    conn.commit()
    conn.close()

if __name__ == "__main__":
    setup_database()