标签: postgresql
我想计算唯一对的数量。我正在尝试查询:
select count(distinct a, b) from t
但它给出了错误:
ERROR: function count(integer, integer) does not exist
如何解决此问题?
答案 0 :(得分:3)
元组的语法是(a,b)。因此您的查询应该是
select count (distinct (a, b)) ab_count from t