The problem of repeating the sports date?

:
public function getMemberPhysicalTestDate()
{
    $arr = MemberPhysicalTest::find()
        ->alias("mpt")
        ->joinWith(["member m"],FALSE)
        ->where([
            "m.member_account_id" => $this->accountId,
            "mpt.type" => $this->type,
            "mpt.is_delete" => 0
        ])
        ->select("mpt.create_at")
        ->groupBy(["DATE_FORMAT(from_unixtime(mpt.create_at),"%Y-%m-%d")"])
        ->orderBy("mpt.create_at desc")
        ->asArray()
        ->all();
    return $arr;
}

clipboard.png

clipboard.png
this method doesn"t work very well: only the first item is found, and the second one is not found on June 26th.

Mar.22,2021

public function getMemberPhysicalTestDate()
{
    $arr = MemberPhysicalTest::find()
        ->alias('mpt')
        ->joinWith(['member m'],FALSE)
        ->where([
            'm.member_account_id' => $this->accountId,
            'mpt.type' => $this->type,
            'mpt.is_delete' => 0
        ])
        ->select(["DATE_FORMAT(mpt.create_at,'%Y-%m-%d') as testDate"])
        ->groupBy(["DATE_FORMAT(mpt.create_at,'%Y-%m-%d')"])
        ->orderBy('mpt.create_at desc')
        ->asArray()
        ->all();
    return $arr;
}
groupByfrom_unixtimeok
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b5a8-412ca.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b5a8-412ca.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?