def q1():
db.executescript(
DROP VIEW IF EXISTS q1;
CREATE VIEW q1 AS
SELECT C.company_name, A.price_amount
FROM companies as C, acquisitions as A
WHERE C.status = 'acquired' and C.company_name = A.company_name;
SELECT * FROM q1;
)
return
q1()
When running the above, I'm getting the following error:
DROP VIEW IF EXISTS q1; ^ SyntaxError: invalid syntax
Can someone see what I'm doing wrong here?