SQL: Return only first occurrence

前端 未结 5 2189
我在风中等你
我在风中等你 2021-02-19 11:48

I seldomly use SQL and I cannot find anything similar in my archive so I\'m asking this simple query question: I need a query which one returns personID and onl

5条回答
  •  萌比男神i
    2021-02-19 12:06

    You're making it way too difficult:

    select personID, min(seenTime)
    from personAttendances
    group by personID
    

提交回复
热议问题