Select the latest MySQL Data but unique resort

后端 未结 5 1425
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 16:41

I have a 1 table database that has a list of advertisements. I am trying to grab the LATEST advertisement for EACH resort. I know it should pr

5条回答
  •  醉梦人生
    2021-01-21 17:00

    Use GROUP BY function

    SELECT MAX(dateAdded), resort, linkToUrl FROM `your_table` GROUP BY resort
    

提交回复
热议问题