General info on Resources for Running SQL Server queries
One popular site is SQL fiddle that currently provides online test facilities for MS SQL Server 2008 and MS SQL Server 2014 (among others).

Another one is "our very own" data.stackexchange.com, where you can run arbitrary queries against recent snapshots of the site data on SQL Server.