A family of Microsoft relational database management systems designed for ease of use.
The SQL you posted is a mishmash and I am sure it would not run on MS SQL Server. Punctuation is missing. You have 'v' as an alias but it is never defined unless it should be 'r' (report_invoice) which is defined and not used.
It actually seems to be several queries with lots missing. Where did you obtain it?