products表里取消用户ID,产品ID重复值,,,,,distinct on(列名1,列名2,,,)
例子:select distinct on (user_id,product_id),product_price from products ...............
products表里取消用户ID,产品ID重复值,,,,,distinct on(列名1,列名2,,,)
例子:select distinct on (user_id,product_id),product_price from products ...............
转载于:https://www.cnblogs.com/xiangxiaodong/archive/2012/12/16/2820485.html