You can do it by inserting the SQL queries you want in the query variable like👇👇 # Create a database connection engine = create_engine(database_url) # Example SQL query with GROUP BY, HAVING, and ORDER BY query = """ SELECT column1, COUNT(column2) as count_column2 FROM your_table GROUP BY column1 HAVING count_column2 > 5 ORDER BY count_column2 DESC """
Thank you so much
how do i run queries using where, having, e.t.c using the jupiter notebook
You can do it by inserting the SQL queries you want in the query variable like👇👇
# Create a database connection
engine = create_engine(database_url)
# Example SQL query with GROUP BY, HAVING, and ORDER BY
query = """
SELECT column1, COUNT(column2) as count_column2
FROM your_table
GROUP BY column1
HAVING count_column2 > 5
ORDER BY count_column2 DESC
"""