Query help

Hi . I have an issue in writing the query for below scenario
CompanyA. Sep 2021. 45000rupees
CompanyA. Jan 2021. 3300rupees

CompanyB. March 2021. 5000rupees

CompanyB. Jan 2021. 6000rupees

Now I need to find the company amount as different if the date is more 6 months . If not sum the amount and show as 1 row

Welcome

Is the literally the string 45000rupees?

Just mentioning format . It is just 45000