# #1890 The Latest Login in 2020

#### <https://leetcode.com/problems/the-latest-login-in-2020/>

{% tabs %}
{% tab title="MS SQL Server" %}

```sql
SELECT user_id, MAX(time_stamp) AS last_stamp
FROM Logins
WHERE time_stamp BETWEEN '2020-01-01' AND '2020-12-31 23:59:59'
GROUP BY user_idqsq
```

{% endtab %}
{% endtabs %}
