--COMMENT-----TRUNCATE table1 ; --COMMENT-----WITH table5 AS ( SELECT DISTINCT col1, col2, col3 FROM table6 ...
The parsing of the PIVOT statement is compromised when we are doing JOIN before it. I should be able to parse this query: sql_request = """ SELECT consumer.id, event_date FROM consumer LEFT JOIN ...