| 52 | |
| 53 | == Трансакции по валута, подредени по време |
| 54 | {{{ |
| 55 | SELECT |
| 56 | tm.s_account_id AS sender_id, |
| 57 | a_s.username AS sender_username, |
| 58 | tm.r_account_id AS receiver_id, |
| 59 | a_r.username AS receiver_username, |
| 60 | tm.t_id, |
| 61 | t.timestamp, |
| 62 | t.amount, |
| 63 | tm.currency |
| 64 | |
| 65 | FROM |
| 66 | transferred_money tm |
| 67 | JOIN |
| 68 | account a_s ON tm.s_account_id = a_s.id |
| 69 | JOIN |
| 70 | account a_r ON tm.r_account_id = a_r.id |
| 71 | JOIN |
| 72 | "transaction" t ON tm.t_id = t.id |
| 73 | WHERE currency='EUR' |
| 74 | ORDER BY timestamp; |
| 75 | |
| 76 | }}} |
| 77 | |
| 78 | |
| 79 | |