shell中运行成功 代码中报语法错误 解决办法 使用三引号 sql = ‘’‘xxxxxxxxxx’‘’ sql = ('''select date, start_price, stop_price from abc001_defect where DATE_FORMAT(date, '%Y-%m-%d') >= '2019-01-01' and DATE_FORMAT(date, '%Y-%m-%d') <= '2019-12-31';''') 成功get数据