Last Transaction
Start Timer
0:00:00
Given a table of bank transactions with columns id
, transaction_value
, and created_at
representing the date and time for each transaction, write a query to get the last transaction for each day.
The output should include the id of the transaction, datetime of the transaction, and the transaction amount. Order the transactions by datetime.
Example:
Input:
bank_transactions
table
Column | Type |
---|---|
id |
INTEGER |
created_at |
DATETIME |
transaction_value |
FLOAT |
Output:
Column | Type |
---|---|
created_at |
DATETIME |
transaction_value |
FLOAT |
id |
INTEGER |
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments