I want to select SUM of last 200,100 and 50 rows of close price from a table in a single query. given below is the query for 200 rows.
SELECT SUM(Close_price) as tot200 FROM cash_data ORDER BY date_added LIMIT 0,200
can anyone help me with this.