I have the following sql statement in my config.properties file
sql.select_stoploss=SELECT Prices2.Stock, Prices2.Date, max(Prices2.Close) FROM Prices2 WHERE Prices2.Stock = ? AND Prices2.Date >= ?
(PS I only put the Table name in because I thought that Date may have been some sort of reserved word in SQLite, I get the same results without the table name prefix))
It returns the correct Max Value for Close but returns the Date of the last record in the file for the SELECTed WHERE Stock. It returns the correct Stock code but that is in the WHERE statement.
I run this query in DB Browser
SELECT Prices2.Stock, Prices2.Date, max(Prices2.Close) FROM Prices2 WHERE Prices2.Stock = 'BHP.AX' AND Prices2.Date >= '2014-06-07'
AND I get the correct Close and Date
I was wondering if anybody had any ideas
Thanks in advance