开发者

How can I find all the distinct pair of values in a table

开发者 https://www.devze.com 2023-02-07 00:39 出处:网络
I have a database table, which has a primary key id and two fields installation_id and stat_value. An installation_id can have more than one stat_value and same is applicable for stat_value. I want

I have a database table, which has a primary key id and two fields installation_id and stat_value.

An installation_id can have more than one stat_value and same is applicable for stat_value. I want to find all the records, i.e. all the installation_ids associ开发者_开发问答ated with stat_values.


This might be what you are after:

SELECT DISTINCT installation_id, stat_value FROM your_table;
0

精彩评论

暂无评论...
验证码 换一张
取 消