added SQL to Dataframe code