Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の句が各 userId について、最終接続日を返さないのはなぜですか? テーブルには31個の異なるユーザーIDがあり、それぞれに多くの日付があります...
select userid, date from connections group by userid having date = max(date)
なぜhaving修飾子を追加するのですか?各ユーザーの最後の接続の最大日付が必要な場合は、これを試してください:
having
select userid, max(date) from connections group by userid;