Practice Interview Questions
| Question | Status |
|---|---|
Write a SQL query to obtain the 3rd oldest transaction for each user using the Uber transactions table. The output should include the user's ID, the amount spent in this 3rd transaction, and the date of the transaction.
transactions table:
| Column Name | Description |
|---|---|
| user_id | Identifier for the user |
| spend | Amount spent in the transaction |
| transaction_date | Time the transaction occurred |
| user_id |
|---|
Write a SQL query to obtain the 3rd oldest transaction for each user using the Uber transactions table. The output should include the user's ID, the amount spent in this 3rd transaction, and the date of the transaction.
transactions table:
| Column Name | Description |
|---|---|
| user_id | Identifier for the user |
| spend | Amount spent in the transaction |
| transaction_date | Time the transaction occurred |
| user_id |
|---|
| transaction_date |
|---|
| 141 | 69.60 | 2020-02-05 12:00:00 |
| transaction_date |
|---|
| 141 | 69.60 | 2020-02-05 12:00:00 |