This FREE tool for SharePoint (WSS 3.0, MOSS 2007, SharePoint Foundation 2010, SharePoint Server 2010, SharePoint Foundation 2013, SharePoint Server 2013)
allows you to execute classic sql query using lists and document libraries like simple tables.
You can perform SELECT, INSERT, UPDATE, DELETE and "cross sub-site" JOIN; you can also export
query results to Excel, Xml or Csv file.
Finally, you can view all users belonging to a SharePoint group and, conversely, all the SharePoint groups
to which the user belongs.
IMPORTANT: In the settings panel insert a site collection administrator credentials.