我的postgresql在Zapier上出现了一个错误:“;(psycopg2.编程错误)关系“;“重复电子邮件”;“已经存在”;
我有一个来自实时数据库的查询,我写这个查询的目的是只返回给定电子邮件的一行。我有一些行包含多列数据,但在电子邮件列中包含来自再次使用我们服务的返回用户的相同电子邮件。当我在Postco的时候,这个查询似乎运行得很好,返回了我想要的所有数据,但是当我把它作为一个自定义查询输入到连接到Google Sheets的Zapier中时,我得到了一个错误。我回到邮递公司,看看是否能解决这个问题。我注意到,如果只运行查询的第一部分,将数据选择到表“duplicate tables”中,就会出现相同的错误。然而,当我运行第三个查询时,一切似乎都正常。我不知道如何解决这个问题,并向Zapier寻求支持,但他们没有答案。Zapier是否可能只运行第一个查询而不运行其他两个查询?我该如何解决这个问题 这是我的疑问:我的postgresql在Zapier上出现了一个错误:“;(psycopg2.编程错误)关系“;“重复电子邮件”;“已经存在”;,postgresql,zapier,postico,Postgresql,Zapier,Postico,我有一个来自实时数据库的查询,我写这个查询的目的是只返回给定电子邮件的一行。我有一些行包含多列数据,但在电子邮件列中包含来自再次使用我们服务的返回用户的相同电子邮件。当我在Postco的时候,这个查询似乎运行得很好,返回了我想要的所有数据,但是当我把它作为一个自定义查询输入到连接到Google Sheets的Zapier中时,我得到了一个错误。我回到邮递公司,看看是否能解决这个问题。我注意到,如果只运行查询的第一部分,将数据选择到表“duplicate tables”中,就会出现相同的错误。然而
select distinct cu.id, cu.email, cu.created_at, cu.name, ua.amount, a.expression, cu.signup_source, cu.first_name, cu.last_name, cu.referrer_source
into duplicateemails
from cp_users as cu
full outer join cp_user_advances as ua on (cu.id = ua.user_id)
full outer join cp_advance_expressions as a on (cu.id = a.user_id)
full outer join oauth as yt on (cu.id = yt.user_id)
full outer join cp_qualification_info as yt2 on (cu.id = yt2.user_id)
where cu.email NOT LIKE '%evan%' and cu.email NOT LIKE '%gmail.com%'
group by cu.id, cu.email, cu.created_at, cu.name, ua.amount, a.expression, cu.signup_source, cu.first_name, cu.last_name, cu.referrer_source
having count(cu.email) > 1
ORDER BY cu.created_at DESC;
select distinct cu.id, cu.email, cu.created_at, cu.name, ua.amount, a.expression,
cu.signup_source, cu.first_name, cu.last_name, cu.referrer_source
into singleemails
from cp_users as cu
full outer join cp_user_advances as ua on (cu.id = ua.user_id)
full outer join cp_advance_expressions as a on (cu.id = a.user_id)
full outer join oauth as yt on (cu.id = yt.user_id)
full outer join cp_qualification_info as yt2 on (cu.id = yt2.user_id)
where cu.email NOT LIKE '%evan%' and cu.email NOT LIKE '%gmail.com%' and cu.email not in
(select email from duplicateemails)
group by cu.id, cu.email, cu.created_at, cu.name, ua.amount, a.expression, cu.signup_source, cu.first_name, cu.last_name, cu.referrer_source
ORDER BY cu.created_at DESC;
select id, email, created_at, name, amount, expression, signup_source, first_name, last_name, referrer_source
from duplicateemails
union
select id, email, created_at, name, amount, expression, signup_source, first_name, last_name, referrer_source
from singleemails
ORDER BY created_at DESC;`
我需要让他们单独询问Zapier或其他什么吗