I want to display the names of people ( recipient
) who received at least 1024
in a maximum of 3 transactions.
Here the transfers table:
sender | recipient | date | amount
------------+------------+------------+--------
Smith | Williams | 2000-01-01 | 200
Smith | Taylor | 2002-09-27 | 1024
Smith | Johnson | 2005-06-26 | 512
Williams | Johnson | 2010-12-17 | 100
Williams | Johnson | 2004-03-22 | 10
Brown | Johnson | 2013-03-20 | 500
Johnson | Williams | 2007-06-02 | 400
Johnson | Williams | 2005-06-26 | 400
Johnson | Williams | 2005-06-26 | 200
Answer: Johnson and Taylor.
How to do this query?