calculate percent change between two entire rows i have a table of currency data, it's have multiple records in each rows.

| Date           | ETH  | XRP | LTC | USDT | BTC  | etc... |
|----------------|------|-----|-----|------|------|--------|
| Today          | 3111 | 0.3 | 100 | 1    | 3500 |        |
| Tomorrow       | 3211 | 0.6 | 90  | 1.14 | 3540 |        |
| After Tomorrow | 3215 | 0.8 | 122 |   1  |      |        |


Date column is timestamp.  

the output sample data is: 

| Date             | ETH  | XRP | LTC | USDT | BTC  | etc... |
|------------------|------|-----|-----|------|------|--------|
| Past Day -&gt;Today | 10%  | 1%  |-10% | 0    | 2%   |        |


I want to know how to find the percent change from day to day for all column that have price(ETH,XRP,LTC,USD,...) without execute multi query request like this : 

SELECT t.*,
 BTC - (SELECT BTC FROM PRICE prev WHERE prev.date &lt; t.date ORDER BY date DESC LIMIT 1) AS percent
Use a sefl-join:

SELECT
    c1.dt as Init, c2.dt as End,
    ((c2.ETH - c1.ETH) * 0.1) AS ETH,
    ((c2.XRP - c1.XRP) * 0.1) AS XRP,
    ((c2.LTC - c1.LTC) * 0.1) AS LTC,
    ((c2.USDT - c1.USDT) * 0.1) AS USDT,
    ((c2.BTC - c1.BTC) * 0.1) AS BTC
FROM
    currency c1
LEFT JOIN
    currency c2
    on c2.dt = c1.dt + 1 
ORDER BY
    c1.dt;




Init       | End        |  ETH |  XRP |  LTC | USDT |  BTC
:--------- | :--------- | ---: | ---: | ---: | ---: | ---:
2019-01-01 | 2019-01-02 | 10.0 |  0.1 | -1.0 |  0.0 |  4.0
2019-01-02 | 2019-01-03 |  0.4 |  0.0 |  3.2 |  0.0 | -2.0
2019-01-03 | null       | null | null | null | null | null



db&lt;>fiddle here