JSQLParser/JSqlParser — pull request #80 by LionelNirva (2014-10-08 12:05:45+00:00)
Title: Deparsing query having DISTINCT and TOP

This is a proposal for a fix for SQL Server queries having TOP and DISTINCT clauses.
SQL Server requires to have the DISTINCT clause first.
See http://msdn.microsoft.com/en-gb/library/ms132161(v=sql.100).aspx

I only tested for SQL Server because I think that only SQL Server accepts the TOP clause.