我想将以下嵌套查询转换为连接。
query = """ INSERT INTO ptable
(a,b,c)
(SELECT %d, 'valll',id
FROM btable
WHERE e = %d
AND f = %d);
""" %(Data1,data2, data3)