1SQL_Query = pd.read_sql_query(
2'''select
3product_name,
4product_price_per_unit,
5units_ordered,
6((units_ordered) * (product_price_per_unit)) AS revenue
7from tracking_sales''', conn)
8
1select *
2from table1 inner join table on table1.cc = table2.cc and table1.kc = table2.kc and table1.nn = table2.nn
3where table1.date <> table2.date
1select a.passengerId passA,b.passengerId passB,count(*) numflightsTogether from df a inner join df b on (a.flightid=b.flightid and a.date=b.date ) where a.passengerid != b.passengerid group by a.passengerid,b.passengerid having count(*) >3