text_html_output_1.png
from sqlalchemy import create_engine

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import pandas as pd ## import liberaries pandas

import pandas as pd
df = pd.read_csv('/kaggle/input/analytics-industry-salaries-2022-india/Salary Dataset.csv')

df = df.rename(columns={'Company Name': 'CompanyName', 'Job Title': 'JobTitle', 'Salaries Reported': 'SalariesReported'}, inplace=False)

from sqlalchemy import create_engine
engine = create_engine('sqlite://', echo=False)
df.to_sql('SalaryDataset', con=engine)

sql = '\n\nSelect * from SalaryDataset\nlimit 5\n\n\n'
df_sql = pd.read_sql_query(sql, con=engine)

sql = "\n\nSelect * from SalaryDataset\nwhere CompanyName='IBM'\n\n\n"
df_sql = pd.read_sql_query(sql, con=engine)

sql = '\n\nSelect distinct(jobtitle) as job_title from SalaryDataset\n\n\n\n'
df_sql = pd.read_sql_query(sql, con=engine)

sql = '\nSelect \njobtitle,\ncount(salariesreported) as count_of_reports \nfrom SalaryDataset\ngroup by jobtitle\norder by count(salariesreported) desc\n'
df_sql = pd.read_sql_query(sql, con=engine)
df_sql.head()