I am having trouble in getting the all the savings in a financial year. the financial year starts from April of this year to March of next year.
Here is the table structure
CREATE TABLE IF NOT EXISTS `savings` (
`id` int(11) NOT NULL,
`account_no` int(11) NOT NULL,
`financial_year` int(11) NOT NULL,
`reciept_date` date NOT NULL,
`data_entry_date` date NOT NULL,
`savings_reciept_no` int(11) NOT NULL,
`amount` int(10) NOT NULL,
`starting_balance` int(11) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=621 DEFAULT CHARSET=latin1;
Here is the sqlfiddle link http://www.sqlfiddle.com/#!9/bee53/18 What i'm missing in the query? Is there any better query of getting the results in a financial year?