SQL DISTINCT query on Multiple Columns

前端 未结 1 1841
轻奢々
轻奢々 2021-01-21 08:06

I have a table like this:

Artist   Image   Title

Smith    2       Country
Smith    5       Town
Doyle    21      Cat
Lawlor   24      Ball
Jones    8       Chee         


        
1条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 08:58

    Access has FIRSTand LAST aggregates which return the first or last record as it was entered in chronological order

    SELECT Artist, FIRST(Image) AS Image, FIRST(Title) AS Title
    FROM table
    GROUP BY Artist
    

    0 讨论(0)
提交回复
热议问题