Most recent signup for each email address

Given a table of data with columns for name, email, and signup date, this SQL query will find the most recent signup for each email address.

Problem

Given a table of data with columns for name, email, and signup date, write a SQL query to find the most recent signup for each email address.
Example input:
name | email | signup_date
John | john@example.com | 2019-01-01
John | john@example.com | 2019-01-02
Jane | jane@example.com | 2019-01-03
Example output:
name | email | signup_date
John | john@example.com | 2019-01-02
Jane | jane@example.com | 2019-01-03

Solution

This solution is in SQL. Our A.I. can create solutions in multiple languages.
by sarastevens
SELECT name, email, MAX(signup_date)
FROM table
GROUP BY email;

A.I. Evaluation of the Solution

This solution is correct and demonstrates a level of completeness. It solves the problem and uses a sensible approach.

Evaluated at: 2022-11-05 02:16:34

Community solutions:

Check these solutions from our community and artificial intelligence:
The solution above is optimal because it uses the MAX function to find the most recent signup date for each email address.