I write SQL server query in any required SQL server version 2008R2/2012/2014/2016/2017