Below is the code I’m trying to run. I made the repo_date format CHAR so that I can take the timestamp out of the label. However, when I do that, the sorting gets messed up. I’m sorting by the actual repo date as below but still the sorting is wrong.
I run this:
select null link,
to_char(repo_month, 'mm/yyyy') label,
count(distinct(account_number)) voluntary
from repo_tracking_for_mm_mv
where surrender_status is not null
and original_amount > 0
and surrender_status = 'INVOLUNTRY'
group by repo_month
order by repo_month
And get this:
Example Graph
I am just trying to get the timestamp out of the repo_month label. I did that by using TO_CHAR. But the sorting is wrong even though I put “order by repo_month”
New contributor
Mark Lasitter is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.