我有两个相同的查询,但具有不同的where条件值 explain analyse select survey_contact_id, relation_id, count(survey_contact_idand account_id = 12 and deleted_at is NULL group by survey_contact_id, relation_id; 当我运行这两个查询时,它们都产生不同的结果(account_id = 12) AND (survey_id = 888))
我正在使用节点,用postgres数据库对进行续订。我正在将分页记录加载到我的UI中,现在我需要使用与检索分页记录相同的查询来获取总记录计数。任何人,请给样品续写配置来做同样的。请参阅我期望的示例postgres查询,以澄清我的问题
SELECT count(*) over() as total ,name FROM students WHERE gender='male'