The same classic SQL problem of consecutive logins split 11 mainstream models into two camps: 8 gave complete correct answers, and 3 completely collapsed.
The problem required writing a SQL query to find the maximum consecutive login days for each user. The key challenge was to deduplicate dates, then construct a grouping identifier by subtracting the row number from the date, and finally count the length of each group. The 8 models that scored 100 (豆包Pro, Claude Sonnet 4.6, 文心一言4.5, Gemini 2.5 Pro, DeepSeek V4 Pro, Gemini 3.1 Pro, Claude Opus 4.7, GPT-o3) all correctly implemented this logic.
Common Features of Perfect-Score Models
The SQL structure of these models was nearly identical: first use DISTINCT to deduplicate, then use ROW_NUMBER to generate a sequence number, and finally use DATE_SUB(login_date, INTERVAL rn DAY) to construct the grouping key. DeepSeek V4 Pro's version was the cleanest, directly adding ORDER BY max_streak DESC, user_id ASC at the end to fully meet the sorting requirement. Claude Sonnet 4.6 and Gemini 2.5 Pro named the grouping key as grp or streak_group, making the variable naming clearer, but the core algorithm was exactly the same.
The Three<|eos|>
Data source: YZ Index | Run #122 | View raw data
© 2026 Winzheng.com 赢政天下 | 转载请注明来源并附原文链接