gpt4 book ai didi

php - mysql分组选择最近的日期

转载 作者:行者123 更新时间:2023-11-29 04:36:32 25 4
gpt4 key购买 nike

<分区>

我想从下面的示例表中为每个 PropertyId 和 Type 选择最近的日期。

|PropertyId | Type | ExpiryDate
|1 |1 | 2017-01-20

|1 |1 | 2016-01-20

|1 |2 | 2017-01-20

|1 |2 | 2016-01-20

|2 |1 | 2017-01-20

|2 |1 | 2016-01-20

|2 |2 | 2017-01-20

|2 |2 | 2016-01-20

所以会寻找结果:-

|PropertyId | Type | ExpiryDate

|1 |1 | 2017-01-20

|1 |2 | 2017-01-20

|2 |1 | 2017-01-20

|2 |2 | 2017-01-20

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com