Assume that data table there are five days a year, the results of the query date 2-4
Hope the query result is
Prose, this is business situation table chronology, content of course, course name, borrowing at the beginning, occurs, the final amount, all records in the table for borrowing at the beginning, at least, in the final six is not 0, within a certain date range query purpose for a query table amount and the balance of all my subjects, such as range does not exist a certain subjects and exists in the entire table, take the subject distance left outside the range closest to the date of the borrowers ending balance, such as the subjects in the left outside the interval does not exist, take a right outside the range closest to the date of initial balance of lenders,
Hope to use the SQL, can through the select into temp drop table after temp method to improve efficiency, for a great god guidance!
CodePudding user response:
What you said is between,,, and, and, the function of the ahCodePudding user response: