在一个列上选择DISTINCT,同时返回其他列?
我有一个查询,该查询使用三个查找表来获取我需要的所有信息。我需要DISTINCT为一列提供值,但是我还需要与之关联的其余数据。 我的SQL代码: SELECT acss_lookup.ID AS acss_lookupID, acss_lookup.product_lookupID AS acssproduct_lookupID, acss_lookup.region_lookupID AS acssregion_lookupID, acss_lookup.document_lookupID AS acssdocument_lookupID, product.ID AS product_ID, product.parent_productID AS productparent_product_ID, product.label AS product_label, product.displayheading AS product_displayheading, product.displayorder AS product_displayorder, product.display AS product_display, product.ignorenewupdate AS product_ignorenewupdate, product.directlink AS product_directlink, product.directlinkURL AS product_directlinkURL, product.shortdescription AS product_shortdescription, product.logo AS product_logo, product.thumbnail AS …