Ok. I modified the data type for price and date as you mentions.
symbol VARCHAR(10) , price DECIMAL(10,2) , date Date(12)
My ultimate target is to display stock prices on my website just like tradingeconomics dot com/commodities does.
Symbol_Name Price Change Day_changed_in_% Weekly_changed_in_% Monthly_changed_in_% YoY_changed_in_% Date
In stock market, it is not necessary all symbol trade every day, majority symbol trade every day but some do not. so for calculation of last week price, last month price and last year price , i like to select nearest back date.
currently, I have just 3 days data in my table as sample data. I plan to import whole year data after cleaning it in my table.
In excel if I have data like current price , last week price , last month price , yoy price , then i can calculate % of all data and display it on my page through table format. but unfortunately I could not get displaying data in desire format in phpmyadmin through sql statement.
so for I tried "SELECT * FROM stockdata symbol where date = '2022-09-23' || date = '2022-09-28' order by symbol; " . it show data in row by row, not column wise.