0

Hope you understand my question. I want to realize a query for this:

Table: Property

id, name, string_value, property, article_id
 1   test     131      test_name       15
 2   test     131      test_name       17
 3   test     131      test_name       19
 4   test     138      test_name       1
 5   test     138      test_name       119
 6   test     194      test_name       319
 7   test     194      test_name       329

I want to select from this all string_values (just one and 1 article_id I don't care about which it can be rdm)

I need to select by Property.property and Property.string_value and result should be 1 pair like:

Result Table:

article_id:
15
1
319

is there a way to get this by a query?

4

1 回答 1

1

根据您提供的数据,您可以使用此查询:

   SELECT min(article_id) AS `article_id` 
   FROM `table1`
   GROUP BY `string_value`
于 2013-07-26T07:23:15.803 回答