SQL query retrieving date period from DB where one date has fixed month
posted 2 years ago
I am completely lost. I am coding a program where I can track my finances. In one of the components(JLabel) I want to see money spent from fixed day of the month to this day. For example: the day of the month I want to be fixed is every 10th of the month, since today is 29th i want to be able to calculate a sum of money spent from today to 10th of this month if day of this month is > then 10th and from today to the 10th of last month if todays day of the month is < then 10th. Any ideas how can I construct my SQL query?