SQL: How can I return the highest ranking record of similar records, based on one column value?

前端 未结 4 2036
無奈伤痛
無奈伤痛 2021-01-27 23:22

This seems like it should be easier than I\'m finding it. I have a table that contains both first and last names (specified by a type ID) and a frequency of how common the name

4条回答
  •  被撕碎了的回忆
    2021-01-27 23:51

    If I understand what you're wanting...

    This will get you the First Names:

    SELECT *
    FROM [NameTable]
    WHERE FrequencyPercent > 1.0
        AND NameType = 1
    ORDER BY FrequencyPercent
    

提交回复
热议问题